请参见使用YAML管道在Azure DevOps中构建构件

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

我似乎缺少一些东西。当使用经典编辑器创建构建管道时,我可以在右上角看到工件选项卡:

enter image description here

我可以在其中浏览编译器创建的内容,以帮助查找发布管道的文件夹结构。

现在,当我使用YAML模板(也是NET Framework)创建构建管道时,就没有工件了:

enter image description here

根据日志,已写入一些文件。是否有某种文件浏览器,或者我是否必须猜测these variables中的哪个与日志文件中的哪个文件夹匹配?

这是我的摘要页面的外观:enter image description here

这是YAML:

# .NET Desktop
# Build and run tests for .NET Desktop or Windows classic desktop solutions.
# Add steps that publish symbols, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/apps/windows/dot-net

trigger:
- master

pool:
  vmImage: 'windows-latest'

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

steps:
- task: NuGetToolInstaller@1

- task: NuGetCommand@2
  inputs:
    restoreSolution: '$(solution)'

- task: VSBuild@1
  inputs:
    solution: '$(solution)'
    platform: '$(buildPlatform)'
    configuration: '$(buildConfiguration)'

- task: ArchiveFiles@2
  inputs:
    rootFolderOrFile: '$(Build.BinariesDirectory)'
    includeRootFolder: false
    archiveType: 'zip'
    archiveFile: '$(Build.ArtifactStagingDirectory)/Release.zip'
    replaceExistingArchive: true

我使用的YAML主要是从Github存储库构建时产生的标准YAML。如果可以看到工件,这会影响吗?我应该以某种方式先将Github内容复制到Azure,然后再构建它吗?

azure azure-devops
1个回答
0
投票

这似乎是classicYAML的不同UI。

要查看工件结构,您可以进入一个构建的summary页面(https://dev.azure.com/xxxx/xxxx/_build/results?buildId=xxx&view=results)。然后将其聚焦在正确的部分,您将看到如下所示:

enter image description here

单击它,然后您将看到它的文件夹结构(https://dev.azure.com/xxx/xxx/_build/results?buildId=xxx&view=artifacts&type=publishedArtifacts):

enter image description here

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