brunohmferreira / PostAutoGitTag

It's an Azure Pipelines Decorator to create a git tag.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PostAutoGitTag - Git: Tag Creation

A series of sample Decorators for Azure Pipelines (Release).

Decorators in this repo work only with Azure DevOps (they are not available in Azure DevOps Server).

Check the official documentation for more information about Azure Pipelines decorators.

Intro to Decorators

It's an Azure Pipelines Decorator to create a git tag.

About this repo structure

There are 2 types of Basic Decorators in this repo:

  • Build: The Decorators in this folder work with both the Classic Build pipelines and the Multistage (YAML) pipelines.
    • When running in YAML pipelines, they are applied to both Jobs and Deployment Jobs
  • Release: The Decorators in this folder work only with the Classic Release pipelines.

This project focus on a Release type and it runs after any other task in the pipeline.

Getting Started

For prerequisites take a look here

Build and Package the extension

First you need to install all the Node.js dependencies:

npm install

Then you need to actually create the extension:

tfx extension create

This will generate the .vsix package file

Publish the extension

When you have the extension file, head to the marketplace management portal and add the new extension.

You will also need to share the extension to your organization.

Only private extensions can contain Decorators, so be sure not to make it public. For more info take a look at: https://docs.microsoft.com/en-us/azure/devops/extend/get-started/node?view=azure-devops#package-and-publish-your-extension

Install the extension

Once shared with your Azure DevOps Organization, you can head to the Manage Extensions tab under Organization Settings, go to Shared and finally install your Decorator Extension.

For more info take a look at: https://docs.microsoft.com/en-us/azure/devops/extend/get-started/node?view=azure-devops#install-your-extension

Use the extension

Once installed, you need to do the following steps to run the extension:

  • Create a variable called Decorator.GitTagCreation.Enabled and set it to true.
  • Create a stage called PRD.