Monday, September 26, 2016

Visual Studio Team Services: Create and use task groups

A feature that was recently added to VSTS are Task groups. Task groups allows you to combine a sequence of build/release tasks into a single reusable task. You can choose to extract the parameters from the encapsulated tasks as configuration variables, and abstract the rest of the task information.

The new task group is automatically added to the task catalogue, ready to add to other build/release definitions.

To create a task group you need to edit a build/release definition. Select the task you want to group together, right click and choose Create task group.

image

Ensure that all of the tasks you want to include in a task group have their parameters defined as configuration variables such as $(my-value), where you want to be able to configure these parameters when you use the task group. If you specify a value (instead of a variable) for a parameter, that value becomes a fixed parameter value of the task group.

In the Create task group dialog, enter a name and a description for the new task group, and select a category where you want it to appear in the Task catalogue dialog.

image

The new task group replaces the task sequence in the definition and will be available in the Task catalogue dialog:

image

Remark: Task groups are stored at project level, and are not accessible outside the project scope.

No comments: