如何在Azure DevOps管道中使用复杂变量

时间:2020-08-11 08:55:23

标签: azure-devops yaml azure-pipelines

我正在尝试在variables中编写一个版本,然后在name中使用它:

enter image description here

但是它最终像:

enter image description here

我想要这种方式的原因是稍后重用version变量以标记程序集并标记分支。

那有可能吗?

2 个答案:

答案 0 :(得分:1)

您可以在管道过程中使用logging command更新管道名称:

- script: echo "##vso[build.updatebuildnumber]'$(version)'"

答案 1 :(得分:0)

我认为我在以后的步骤中找到了一种获得build number的更好方法:

enter image description here

相关问题