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 ?
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: