Coder Social home page Coder Social logo

shudv / azure-pipelines-task-template Goto Github PK

View Code? Open in Web Editor NEW
18.0 0.0 0.0 141 KB

Starter template for creating a custom azure pipelines task

TypeScript 3.01% JavaScript 96.99%
azure-pipelines azure-pipelines-agent azure-devops-extension azure-devops

azure-pipelines-task-template's Introduction

azure-pipelines-task-template

Azure Pipelines

Introduction

This repository contains a quick start template for creating and publishing a custom azure pipelines task written in TypeScript. It uses webpack to bundle scripts and is configured to use jest to run tests. Note that this only works on Windows platform as of now.

Main features

  1. Contains all pieces for the development workflow for a pipeline task - local building/testing/packaging and AzureDevOps based CI and PR validation pipelines.

  2. Timestamp based versioning - Standard workflows require you to maintain a version file for your extension and task which is okay for small/medium scale development. Although dynamic versioning is a must if more than one developer needs to work on an extension and frees developers from one thing that needs to be managed by hand.

Getting started

There are a few small steps that need to be carried out before you can start using this template for your purpose-

  1. Create two guids and replace {{guid_production}} and {{guid_development}} occurences with these values in webpack config. You can use this tool to generate guids. (It helps to have different guids for different environments as it allows you to install multiple extension flavors in the same account)

  2. Enter your publisher and author name in place of {{publisher}} and {{author}} strings. These files have references to these strings - webpack config, task.json and manifest.json

  3. Create a personal access token for the Azure Devops account where you would test run your task. Refer this to learn how to create a personal access token.

  4. Set following environment variables to enable inner loop commands-

    • BUILD_ENV = development
    • ADO_PAT - Your personal access token
    • ADO_ACCOUNT_URI - The default collection URI for your account (eg. https://dev.azure.com/{{name}})
    • DEV_PUBLISHER - Id of your publisher account
  5. Run following commands to verify setup-

    1. npm install (Installs npm dependencies)
    2. npm run dev (Builds, packages and publishes the extension)
  6. Refer to package.json to see the list of all commands.

Typical inner loop commands

What changed? Which NPM command to run? What it does?
Task implementation npm run dev:task Build, package and update custom task without updating extension (Faster)
Anything else npm run dev Build, package and publish full extension (Slower)

Questions/Issues?

It is possible that this template does not work out of the box in your specific environment. This can happen because of multiple reasons. I would love to know the issues faced so that I can submit corresponding fixes. Please create a GitHub issue describing your problem.

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.