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

Logo

CI/CD社区为您提供最前沿的新闻资讯和知识内容

更多推荐