azure - Azure DevOps 工件
问题描述
我是 Azure DevOps(托管代理)的新手,我正在尝试使用 Azure Pipelines 使用 Ant 构建我的 Java Web 应用程序
下面是管道文件
trigger:
- azure-pipelines
pool:
vmImage: 'ubuntu-latest'
steps:
- task: Ant@1
inputs:
workingDirectory: ''
buildFile: 'ant/build.xml'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.8'
jdkArchitectureOption: 'x64'
publishJUnitResults: true
testResultsFiles: '**/TEST-*.xml'
项目构建成功,但 WAR 文件的路径显示为
建设战争:/home/vsts/work/1/s/war/Project.war
我无法/home/vsts/work/1/s
在 Azure DevOps 中找到路径,我尝试在 Artifact 下搜索但未找到,如何访问/home/vsts/work/1/s
以便获取我的 WAR 文件?
解决方案
您需要使用Publish Artifact任务才能获得构建的结果。
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)' # or your build results directory
artifactName: 'drop'
#publishLocation: 'Container' # Options: container, filePath
#targetPath: # Required when publishLocation == FilePath
#parallel: false # Optional
#parallelCount: # Optional
#fileCopyOptions: #Optional
推荐阅读
- swift - 创建约束,其中只有尾随锚可以收缩或扩展
- google-analytics - GTM - 页面上的平铺点击触发器
- macos - 如何使用 IOUserSerial 类将接收数据发送到串行设备
- html - 如何折叠表格 HTML 中只有一行的边框
- spring-webflux - 在 Project Reactor 中,什么是“目标”Mono/Flux?
- javascript - 如何修复:UnhandledPromiseRejectionWarning:错误:SQLITE_CANTOPEN:使用 SQLite3 和 Knex js 时无法打开数据库文件
- swift - 更改 SegementedPickerStyle (UIKit & SwiftUI) 的背景颜色
- aggregate - 在 Pentaho 中创建聚合表时出错
- c# - Async/Await 似乎在 c# 中启动了一个新线程?
- python - openpyxl 设置像 Company 和 Comments 这样的属性值