gpt4 book ai didi

azure-devops - 构建管道可视化设计器中某个任务的 YAML 中的注释的目的是什么?

转载 作者:行者123 更新时间:2023-12-04 14:54:04 24 4
gpt4 key购买 nike

当我在 YAML 中查看构建管道的可视化设计器中的任务时,我看到类似的评论

#Your build pipeline references an undefined variable named ‘Parameters.projects’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab. See https://go.microsoft.com/fwlink/?linkid=865972

这是给我添加 Parameters.projects 变量的指令,还是我决定在构建 YAML 构建管道时使用 YAML 时可以引用的内容?

最佳答案

这些更像是对用户的一种指令,以了解流程。

例如。:

这里参数( parameters.solution )链接到值 **\*.sln
enter image description here

这个 YAML 是

#Your build pipeline references an undefined variable named ‘Parameters.solution’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab. See https://go.microsoft.com/fwlink/?linkid=865972
#Your build pipeline references the ‘BuildPlatform’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971
#Your build pipeline references the ‘BuildConfiguration’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971
steps:
- task: VSBuild@1
displayName: 'Build solution'
inputs:
solution: '$(Parameters.solution)'

msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactstagingdirectory)\\"'

platform: '$(BuildPlatform)'

configuration: '$(BuildConfiguration)'

现在我要取消这个变量的默认值并指向我的 sln文件。

enter image description here

如果我现在看到 YAML 文件,变量 Parameters.solution不再需要,因为解决方案直接分配给 wcfapp.sln . 在这种情况下,您将不会在 YAML 文件中看到任何注释
#Your build pipeline references the ‘BuildPlatform’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971
#Your build pipeline references the ‘BuildConfiguration’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971
steps:
- task: VSBuild@1
displayName: 'Build solution'
inputs:
solution: wcfapp.sln

msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactstagingdirectory)\\"'

platform: '$(BuildPlatform)'

configuration: '$(BuildConfiguration)'

关于azure-devops - 构建管道可视化设计器中某个任务的 YAML 中的注释的目的是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53054048/

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