Libraries for writing VSTS and TFS build tasks
Перейти к файлу
Konstantin Tyukalov a56dfecac4
Fix ToolRunner stdline/errline events buffering (#1055)
* Add tests for stdline and errline

* Correctly buffer line data in ToolRunner

The _processLineBuffer method is incorrectly buffering line data since
the buffer is being passed as a string and thus changes to the buffer
preformed in the method are not persisted. The fix is to use an object
with a string property as the buffer.

* Fix context of emitDoneEvent

* Update buffering logic

* format code

* remove unneded import

* Add types

* Update tests

* Bump version + add changelog

* rename buffer variables

* Rename test & script file

---------

Co-authored-by: Evan Cahill <hacahill@microsoft.com>
2024-09-09 17:52:19 +04:00
.gdn
.github
ci/powershell
docs
node Fix ToolRunner stdline/errline events buffering (#1055) 2024-09-09 17:52:19 +04:00
powershell
res
.gitignore
.npmrc
CONTRIBUTING.md
ISSUE_TEMPLATE.md
LICENSE
README.md
SECURITY.md
azure-pipelines-steps-node.yml
azure-pipelines.yml
index.html
open-pullrequest.ps1
send-notifications.ps1
tasks.schema.json

README.md

Azure Pipelines Task SDK

Libraries for writing Azure Pipelines tasks

Reference examples of our in the box tasks are here

Status

Build & Test
Win-x64 Windows Build & Test
macOS macOS Build & Test
Linux-x64 Linux Build & Test

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 VSTS

Documentation: Creating Node Tasks with the Typescript API

PowerShell Tasks

A task which automates Powershell technologies can be written with our Powershell SDK. These only run on Windows.

Documentation: PowerShell API

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.

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.