Skip to content

Azure DevOps extension to help publishing custom pipeline tasks

License

Notifications You must be signed in to change notification settings

dmitryserbin/azdev-task-publisher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Task Publisher

Overview

The Task Publisher extension adds a task to Azure DevOps which helps you to publish custom tasks using service endpoint.

Extension Build Code
Extension Build CodeFactor

Features

Using Task Publisher extension you can publish any custom pipeline task directly into your Azure DevOps account without a need to create an extension. This extension also helps to control version of your task and manage custom dependencies.

  • Publish new or update existing task
  • Replace existing task entirely
  • Update task patch version number
  • Update task preview version settings
  • Automatically update task dependencies
  • Use service endpoint for authentication

Prerequisites

This is a PowerShell based extension, which means your build agent must be capable of running PowerShell tasks as well as have Node.js pre-installed to run TFX-CLI (installed automatically) commands.

How To Use

The extension requires Azure DevOps service endpoint with specific access to target account to be able to work. There are two types of Azure DevOps service endoints supported:

Type Name Account
integrated SystemVssConnection Project Collection Build Service
specific User specified User specified

You may need to create a new Azure Pipelines service connection using PAT token with Agent Pools: read & manage scope access.

Using Task Publisher extension is simple:

  1. Add Task Publisher task to your pipeline
  2. Select service endpoint with Azure DevOps account access
  3. Specify or select full path to task directory
  4. Choose task versioning options (optionally)

Update task version

When Update patch version selected the publisher will automatically update target task patch version to current release ID from RELEASE_RELEASEID pipeline variable.

{
  "version": {
    "Major": 1,
    "Minor": 0,
    "Patch": 123
  }
}

Selecting Upload preview version will automatically enable preview flag in the task definition. After this, the published task version will be visible as Preview in the pipeline.

{
  "preview": true
}

Please refer to the task.json schema definition for reference.

Update task dependencies

You can make Task Publisher to automatically update external dependencies of the task before publishing. There are two types of dependencies supported:

Type Source Target Description
Modules /Modules {task}/ps_modules PowerShell modules or *.ps1 scripts
Resources /Resources {task}/resources Any artifacts, folders or executables

You can configure dependencies deployment by adding the following configuration to your task.json definition and configuring path to artifacts source directory in the settings.

{
  "modules": [
    "MyModule",
    "MyScript.ps1"
  ],
  "resources": [
    "MyResource-1.0"
  ]
}

When configuration in preset, the publisher will automatically locate required artifacts and modules and copy them to the destination task directory before publishing. This makes the modules and resource be available for the task to consume on runtime.

Support

For aditional information and support please refer to project repository.

About

Azure DevOps extension to help publishing custom pipeline tasks

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published