gpt4 book ai didi

Azure DevOps 工件

转载 作者:行者123 更新时间:2023-12-03 05:39:23 27 4
gpt4 key购买 nike

我是 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文件的路径显示为

构建 war :/home/vsts/work/1/s/war/Project.war

我在 Azure DevOps 中找不到 /home/vsts/work/1/s 路径,我尝试在 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

关于Azure DevOps 工件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59921678/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com