如何在Azure DevOps上创建/编辑YAML发布管道

时间:2020-01-18 21:01:07

标签: azure-devops yaml

我在YAML中有一个构建管道,并且工作正常。我现在要创建发布管道。

我已经使用UI创建了管道,并且添加了一个任务(恰好是AZURUE CLI任务),当U使用UI将变量添加到命令中时,我得到了错误。

#Your build pipeline references an undefined variable named ‘STORAGE_ACCOUNT_NAME’. 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 an undefined variable named ‘STORAGE_ACCOUNT_KEY’. 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

阅读文档,我需要添加

- variables:
YAML的

部分,但是我找不到在哪里直接编辑发布管道YAML。 (构建管道YAML在我的代码中)

如何编辑该YAML发布管道?

或者,如何使用UI向此发布管道添加变量?

1 个答案:

答案 0 :(得分:0)

如何使用UI将变量添加到此发布管道

编辑您的发布管道,您将在Variables旁边找到Tasks标签:

enter image description here

点击Add添加新变量。

或者如果您正在使用变量组:

enter image description here

如何编辑该YAML发布管道?

要启用YAML发布管道,您需要在Multi-stage YAML pipelines中启用Preview features

enter image description here

检查Multi-stage YAML pipelines以获得更多信息。