A series of sample Decorators for Azure Pipelines (Build and Release).
Decorators in this repo work only with Azure DevOps (they are not available in Azure DevOps Server).
Check the official documentation here and here for more information about Azure Pipelines decorators.
I explain more about Pipelines Decorator in my blog post here
If you want to have a step-by-step guide on how Decorators work and how to structure them, check out my video:
In the video I actually reference this repo and its content.
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.
In each of the previous folder, there are three other folders:
- Pre: this decorators run before any other task in the pipeline
- Post: this decorators run after any other task in the pipeline
- PrePost: this decorators run both before and after any other task in the pipeline
The Advanced folder instead contains some different examples of slightly more advanced decorators, with specific implementations.
To keep things simple, each folder contains a standalone decorator extension.
Pick the one you want to use and follow the steps below.
For prerequisites take a look here
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
Remember to change the Publisher in the vss-extension.json file with your publisher
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
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 Decorato 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