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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With