如何在Azure DevOps中更改自定义发行版名称? [英] How to change custom release names in Azure DevOps?
问题描述
我想更改发行名称,例如V.1.0.00
,以便在Azure DevOps的持续交付中进行手动发行,但是如果没有此$(rev:r)
,我将无法删除或更改命名,如何使用自定义名称?>
默认名称:Release- $(rev:r)
必填名称:V.1.0.0
在构建管道中.
您可以自定义管道运行的命名/编号方式.参考: https://docs.microsoft.com/zh-cn/azure/devops/pipelines/process/run-number?view=azure-devops&tabs=yaml
在YAML中,此属性称为名称.
使用变量设置您的主要版本,次要版本等,并使用计数器Ref生成补丁版本: https://docs.microsoft.com/zh-CN/azure/devops/pipelines/release/?view=azure-devops#how-do-i-manage-the-为新版本命名.
I want to change release names like V.1.0.00
for manual release in Continuous Delivery of Azure DevOps but i can't able to delete or change the naming without this $(rev:r)
, how can I use a custom name?
Default Name: Release- $(rev:r)
Required Name: V.1.0.0
In the build Pipeline.
You can customize how your pipeline runs are named/numbered. Ref : https://docs.microsoft.com/en-us/azure/devops/pipelines/process/run-number?view=azure-devops&tabs=yaml
In YAML, this property is called name.
Use variables to set your major version, minor version etc and generate the patch version using counter Ref : https://docs.microsoft.com/en-us/azure/devops/pipelines/process/expressions?view=azure-devops#counter.
for your case you can set major : V.1 minor : 0 patch : $[counter(format('{0}.{1}', variables['major'], variables['minor']), 1)]
and set the name like name: $(major_version).$(minor_version).$(patch_version)
Release pipeline
Refer to $(Build.BuildNumber) which will ref to the buildpipeline custom name/number set in the build pipeline. You can change this naming scheme by editing the release name format mask. In the Options tab of a release pipeline, edit the Release name format property in the General page. Ref : https://docs.microsoft.com/en-us/azure/devops/pipelines/release/?view=azure-devops#how-do-i-manage-the-names-for-new-releases.
这篇关于如何在Azure DevOps中更改自定义发行版名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!