Is there any way to change the Release name of Pipeline after it started and dash board will still consider the new name and reflect it ?
For example at the start of the build ReleaseName=release_1 and after that in one of the step we change its value to ReleaseName=release_11.04122018 but release dashboard will still be having older ReleaseName, how can it be updated with changed name ?
Asked
Active
Viewed 2,141 times
4

Reddysekhar Gaduputi
- 400
- 3
- 22

Rajesh
- 63
- 6
1 Answers
4
To customize the build and release names, you could consider using the commands of build.updatebuildnumber
and respectively release.updatereleasename
from a PowerShell script. See also this page on GitHub.
Translated to yaml, it'll look like this:
- powershell: |
[string]$version="$(Build.Repository.Name)_SomeCustomData_$(Build.BuildId)"
Write-Output "##vso[build.updatebuildnumber]$version"
displayName: Set Build Number
Same applies for setting a release number, but since it's not possible yet to use yaml for release pipelines, you'd need to add a PowerShell task yourself and add an inline script like this:
[string]$name="My custom release name"
Write-Output "##vso[release.updatereleasename]$name"
To see which variables you can use for build and release pipelines, check these pages:

deralbert
- 856
- 2
- 15
- 33

Herman Cordes
- 4,628
- 9
- 51
- 87
-
1For updating the release name of pipeline, the minimum agent pool version should be 2.132, you can write the inline as "##vso[release.updatereleasename]release name" – Rajesh Jan 29 '19 at 12:09
-
Thank you! However, this command is not supported in TFS, see: https://github.com/Microsoft/azure-pipelines-tasks/blob/master/docs/authoring/commands.md – Amittai Shapira Apr 12 '19 at 16:08