Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSTS - Customize Release Name Format

Tags:

azure-devops

I would like to customize my Release Name Format to use the build id of my release artifact. I tried using $(release.artifact._myartifact.buildid) but that is just seen as string. How would I achieve this?

I also tried to configure a group variable but this gave the same result.

like image 992
Dresse Avatar asked Jan 28 '23 15:01

Dresse


1 Answers

The solution to my question on customizing the vsts release name format was found on following page under Primary artifact variables

https://learn.microsoft.com/en-us/vsts/pipelines/release/variables?view=vsts&tabs=powershell

The predefined variable Build.Buildnumber is the same as Release.Artifacts.{Primary artifact alias}.BuildNumber. In my case I used $(Build.BuildNumber)-$(rev:r) to get the desired result.

At first this was not working because I had multiple artifacts. Make sure you select the right artifact as primary artifact.

like image 192
Dresse Avatar answered May 21 '23 03:05

Dresse