microsoft/azure-pipelines-task-lib
TypeScript
Captured source
source ↗microsoft/azure-pipelines-task-lib
Description: Libraries for writing VSTS and TFS build tasks
Language: TypeScript
License: MIT
Stars: 454
Forks: 279
Open issues: 64
Created: 2015-07-06T22:13:57Z
Pushed: 2026-06-16T05:17:35Z
Default branch: master
Fork: no
Archived: no
README:
Azure Pipelines Task SDK
Libraries for writing Azure Pipelines tasks
Reference examples of our in the box tasks are here
Status
| | Build & Test | |---|:-----:| | Windows|[![Build & Test][win-build-badge]][build]| | macOS|[![Build & Test][macOS-build-badge]][build]| | Linux|[![Build & Test][linux-build-badge]][build]|
[win-build-badge]: https://dev.azure.com/mseng/PipelineTools/_apis/build/status/azure-pipelines-task-lib-ci?branchName=master&jobname=windows [macOS-build-badge]: https://dev.azure.com/mseng/PipelineTools/_apis/build/status/azure-pipelines-task-lib-ci?branchName=master&jobname=macOS [linux-build-badge]: https://dev.azure.com/mseng/PipelineTools/_apis/build/status/azure-pipelines-task-lib-ci?branchName=master&jobname=linux [build]: https://dev.azure.com/mseng/PipelineTools/_build/latest?definitionId=7623
Highlights
- __Breaks coupling with agent:__ This lib is decoupled and ships with the task and the agent is just an engine to run tasks.
- __Testability:__ Aims to offer the ability to actually run your task scripts under all scenarios without a server or an agent.
- __Localization:__ The lib provides a mechanism for storing your localized strings with your task, and loading the correct set at run-time.
- __Consistent API:__ The TypeScript and PowerShell libs are largely consistent. They only differ where it makes sense (being true to the platform).
- __Tracing for free:__ Tracing has been built-in to many of the commands. Use the SDK and get some debug tracing for free.
TypeScript Tasks
Cross platform tasks are written in TypeScript. It is the preferred way to write tasks once.
[![NPM version][npm-lib-image]][npm-lib-url] !VSTS
Documentation: [Creating Node Tasks with the Typescript API](node/README.md)
PowerShell Tasks
A task which automates Powershell technologies can be written with our Powershell SDK. These only run on Windows.
Documentation: [PowerShell API](powershell/Docs/README.md)
Notes on authoring Tasks
Starting from version v2.141.0, the agent can now run on three OS architectures: x86, x64, and 32-bit ARM. When authoring a new task, you can check agent variable: Agent.OSArchitecture (possible values: X86, X64, ARM) to restrict running said task to a particular set of OS architectures.
[npm-lib-url]: https://www.npmjs.com/package/azure-pipelines-task-lib [npm-sdk-url]: https://www.npmjs.com/package/vsts-task-sdk
Security issues
Do you think there might be a security issue? Have you been phished or identified a security vulnerability? Please don't report it here - let us know by sending an email to secure@microsoft.com.
Notability
notability 0.0/10Not AI-related.