Azure-pipelines-tasks: VSTS Tag source on release

Created on 5 May 2017  路  2Comments  路  Source: microsoft/azure-pipelines-tasks

On the automated build, there's a way to tag the commit on build, which is great but not enough, I need to tag source on Production Environment successful release using, now I can only do that manually with a commands: I need to be able to do this as part of my Release tasks to production

BUILD_SOURCEVERSION = CommitID

BUILD_REPOSITORY_NAME = Repository

BUILD_BUILDNUMBER = BuildNumber

git clone -q sh://[email protected]:22/DefaultCollection/Repo/_git/$env:BUILD_REPOSITORY_NAME
cd $env:BUILD_REPOSITORY_NAME
git reset --hard $env:BUILD_SOURCEVERSION
git tag 'Prod-Release ' $env:BUILD_BUILDNUMBER
git push origin 'Prod - ' $env:BUILD_BUILDNUMBER
cd .\
Remove-Item -Recurse -Force $env:BUILD_REPOSITORY_NAME

Release enhancement

Most helpful comment

Are you going to update this issue once implemented?
I found the following extension Tag\Branch Git on Release which seems to do the work. But an official feature will always be considered the best solution :)

All 2 comments

Thanks for your feedback. I have added it to our backlog and we will consider it for future releases.

Are you going to update this issue once implemented?
I found the following extension Tag\Branch Git on Release which seems to do the work. But an official feature will always be considered the best solution :)

Was this page helpful?
0 / 5 - 0 ratings