如何将发布文件移动到 Azure Builds 流程的下一步?

问题描述 投票:0回答:1

我在 Azure Pipelines 中有一个成功运行的构建,该构建使用 Wix Toolset 创建安装程序 .msi 文件。我正在使用 msbuild 任务来生成安装程序文件。

您可能已经知道,构建代理将其埋在工作文件夹中,如下图所示。

C:\agent\_work\2\s\SetupProject1\bin\Release\SetupProject.msi  

下一步该如何将这个安装文件移动到目标服务器上(Dev、QA或Prod服务器)?

enter image description here

azure azure-devops wix
1个回答
1
投票

下一步该如何将这个安装文件移动到目标服务器(Dev、QA或Prod服务器)?

你需要添加一个 Publish artifacts task (例如 发布构建工件发布管道工件)后的 msbuild 步。

例如。

- task: MSBuild@1
.....

- task: PublishBuildArtifacts@1
  displayName: 'Publish Artifact'
  inputs:
    PathtoPublish: 'setup file Path' 
    ArtifactName: 'artifact name'
  condition: succeededOrFailed()

发布工件任务可以将构建文件发布为工件。然后你可以在 Release Pipeline 中使用这些工件。

Build Artifacts

© www.soinside.com 2019 - 2024. All rights reserved.