Streamlining Azure Pipeline Using Task Group

Jonathan Kristanto
Bina Nusantara IT Division
3 min readMar 30, 2022
Photo by Richard R. Schünemann on Unsplash

The process of deploying an application used to be very hard and stressful. Then comes the Continuous Integration and Continuous Deployment that use cloud agent to automate the process of deployment. It saves a lot of time and programmer resources. However, what if we could streamline the process even more?

Here comes Azure Task Group to save the day. A task group allows you to encapsulate a sequence of task, already defined in a build or a release pipeline, into a single reusable task. This task then can be added to other build or release pipeline with ease.

Task group allows standardization and centrally manage deployments steps for all applications.

Things to check

Before creating task group, there are important things you have to check. Those are:

  • Extract all parameters as variables, such as $(ThisVariable) so we can configure these parameters in the task group
  • When saving a task group, provide a name and description for the new task group
  • BEWARE! Changes you make to a task group are reflected in every instance of the task group. A single change can affect multiple pipeline

Create a Task Group

  1. Create a pipeline like usual, then make sure to unlink all parameters
Captured by author

2. Select sequence of tasks in the pipeline, click right, then choose to Create task group.

Captured by author

3. Specify the name and description for the new task group.

Captured by author

4. Fill in the explanation for parameters and default value if needed. The values you defined will be mandatory to fill later

Opening the task group setting page
Extract all parameters as variables
Fill in all variables description & default value (if needed)

5. Save the updated pipeline. We can save it normally or save it as draft

Captured by author

When you’ve done setting up the task group, we can use the Task Group we’ve created when setting a new pipeline

Custom task group in new pipeline

Summary

In conclusion what we’ve learned today are:

  • We have created task group to streamline the build and release pipeline
  • We have configured the parameters for the pipeline

Thank you for reading!

--

--