azure-devops - 我们如何在队列时将变量值传递到多阶段 yaml 构建

标签 azure-devops azure-pipelines azure-pipelines-yaml

我希望允许用户覆盖多级 yaml 管道中使用的变量的某些值。 我发现this并尝试过,但没有成功,我不确定我是否正确使用它。文档中也没有可用的示例。

最佳答案

不要在 YAML 文件的变量部分中指定变量。编写整个工作流程并保存。然后打开构建定义的“变量”选项卡(位于 UI 中),在其中创建变量,设置默认值并选中“在队列时允许”。

enter image description here

enter image description here

关于azure-devops - 我们如何在队列时将变量值传递到多阶段 yaml 构建,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60463541/

相关文章:

c# - VSO API Work Item PATCH 给出 400 Bad Request

azure-devops - Azure 管道任务 VSTest@2 因错误而失败 - 无法加载文件或程序集 'Microsoft.VisualStudio.TestPlatform.Common.resources'

string - 如何替换azure-pipelines.yaml中的可变字符串?

azure - 如何在“删除文件”任务中从删除中排除某些目录和文件

azure - 无法选择在 azure devops 中使用托管标识来连接容器注册表

bash - Azure DevOps 在 bash 任务内生成密码

azure - 有没有办法以完整模式部署 "nested"或 "tiered"资源(即服务总线队列)或达到等效结果?

azure-devops - 如何解决 Unable to locate executable file : 'pwsh' . Please verify either the file path exists error when getting buildid with Azure rest API?

azure-devops - 在 Azure DevOps 中的不同项目之间共享变量

azure-devops - 通过部署管道将 DACPAC 从 DevOps 部署到 Azure 的速度极其缓慢