DEV Community

loading...

Adding Tag to GIT Branch in Azure CI Pipelines

Rupesh Tiwari
I am Sr. Software Architect, Profession Trainer & Pluralsight Author. I help students and professionals to become Full Stack Software Developer in less Than a year!
Originally published at rupeshtiwari.com on ・2 min read

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 azure-pipelines.yaml file.

- task: tagBuildOrRelease@0
  displayName: "Add Tag to git"
  inputs:
    type: "Build"
    tags: "TEST-$(Build.BuildNumber)"

Enter fullscreen mode Exit fullscreen mode

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

Discussion (0)