Do you want to know how to tag your git branch while building your source code when someone commits or merge to MASTER/MAIN branch? Then please read this article. I will show you which extension, I use in my Azure pipeline to Tag my git branch.
Installing “Git Tag” DevOp’s Extension to Azure Server
I will use the DevOps extensionGit Tag by ATP to implement the tagging. The good part of this extension is can be used both during build and release time. So I will prefer this extension only.
Add this extension to your organization azure devOps server.
If you are using on-premise azure devOps server then learn hereHow to Install extensions for on-premises servers
Adding Git Tag Task in Azure Pipelines
Type: Select Build ( if you are tagging while release then select release). I am doing while build time.
Add this task to your
- task: tagBuildOrRelease@0 displayName: "Add Tag to git" inputs: type: "Build" tags: "TEST-$(Build.BuildNumber)"
Running Azure CI Pipelines
Notice when I run pipeline
Add Tag to git task succeed
Notice My branch got tag after build success:
Become full stack developer 💻
I teach at Fullstack Master. If you want to become full stack developer and grow your carrier as new software developer or Lead Developer/Architect. Consider subscribing to our full stack development training programs. You can enroll to All-Access Monthly membership plans to get unlimited access to all of our video courses, slides, source code & monthly video calls.
- Please subscribe toAll-Access Membership PRO plan to access current and future angular, node.js and related courses.
- Please subscribe toAll-Access Membership ELITE plan to get everything from PRO plan. Additionally, you will get access to monthly live Q&A video call with Rupesh and you can ask doubts/questions and get more help, tips and tricks.
You bright future is waiting for you so visit todayFullstackMaster and allow me to help you to board on your dream software company as a Developer,Architect or Lead Engineer role.
💖 Say 👋 to me! Rupesh Tiwari www.rupeshtiwari.com ✉️Email Rupesh Founder of Fullstack Master
Top comments (1)
Hi,i want to merge from Develop to master then a tag should be created as 1.0.0 must be a stable version, but as well as i need to tag the same version with my docker image and Client Sdk . how can i achieve this?
And what is the conditon like when i merge develop to master it shld create a TAG. because for every pipeline runs it will create a TAG right. but it shld not be the case.