首页 > 解决方案 > Azure DevOps 构建工件存储在哪里

问题描述

我正在尝试为 WCF 项目创建 CI 管道。我让 CI 成功运行,但无法确定在哪里寻找工件。我的意图是让 CI 管道在 Azure 中发布这个工件,然后让 CD 管道在配置文件上运行转换。最终,我们希望获取该输出并将其存储在 blob 存储中(这可能是另一篇文章,因为 WCF 站点是针对 API 的)。

我也意识到我真的不想压缩工件,因为无论如何我都需要对其进行转换。

以下是我的问题:

  1. 工件“drop”发布到的容器在哪里?
  2. 我如何将站点发布到容器而不使其成为单个文件。

谢谢

# ASP.NET
# Build and test ASP.NET projects.
# Add steps that publish symbols, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/apps/aspnet/build-aspnet-4

trigger:
- release/2021-June-CI

pool:
  vmImage: 'windows-latest'

variables:
  solution: '**/*.sln'
  buildPlatform: 'Any CPU'
  buildConfiguration: 'Release'

steps:
- task: NuGetToolInstaller@1

- task: NuGetCommand@2
  inputs:
    restoreSolution: '**./*.sln'
    feedsToUse: 'select'
    vstsFeed: '******************************' # private nuget package masked

- task: VSBuild@1
  inputs:
    solution: '$(solution)'
    msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactStagingDirectory)"'
    platform: '$(buildPlatform)'
    configuration: '$(buildConfiguration)'

# todo - unit tests do not exist yet
#- task: VSTest@2
#  inputs:
#    platform: '$(buildPlatform)'
#    configuration: '$(buildConfiguration)'

- task: PublishBuildArtifacts@1
  inputs:
    PathtoPublish: '$(Build.ArtifactStagingDirectory)'
    ArtifactName: 'drop'
    publishLocation: 'Container'

标签: azure-devopscontinuous-integration

解决方案


你会在这里找到你的工件:

在此处输入图像描述

你有一个文件,因为你在 VSBuild/p:PackageAsSingleFile=true

您也可以考虑使用更新的任务Publish Pipeline Artifact。如果没有,请在此处DownloadBuildArtifacts检查任务


推荐阅读