Code Monkey home page Code Monkey logo

azurepipelinesdecoratorsamples's Introduction

Azure Pipelines Decorator Samples

CI License time tracker

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.

Intro to 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:

Pipelines Decorators on CoderDave

In the video I actually reference this repo and its content.

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.

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.

Getting Started

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

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

Remember to change the Publisher in the vss-extension.json file with your publisher

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 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

azurepipelinesdecoratorsamples's People

Contributors

n3wt0n avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.