On my pipeline, I can retrieve the build number using the variable RELEASE.ARTIFACTS.MyPipeline_BUILDID
. But I was wondering, how can I get the TAG associated with the build.
It is visible within the pipeline like:
is there a way to capture it in a variable within the yml so I properly concatenate it like:
You can use the variable SourceBranch
:
The branch of the triggering repo the build was queued for. When your pipeline is triggered by a tag:
refs/tags/your-tag-name
So, in the release the variable will be RELEASE.ARTIFACTS.MyPipeline_SOURCEBRANCH
.