'Task Groups' in DevOps
Task group help you group some common tasks which is getting used across multiple pipelines.
- Way 1 : Create multiple pipelines using same tasks. Now we have to make our changes in all such pipelines manually.
- Way 2: If there is a common task that is utilized in multiple pipelines, the most effective approach is to employ task groups.
Task feature
- Assist you in encapsulating the sequence of tasks.
- Assist you in the development of a single, reusable task that can be seamlessly incorporated into the build or release pipeline.
- Task groups can be effortlessly incorporated into the projects from the task catalogues.
- Utilize task groups to centrally manage and standardize deployment processes.
- The modifications made to the task group will be automatically replicated in other locations.
Limitation
Task groups are only supported not supported in YAML based pipeline. It is only supported in classic based pipelines. (managed through another way in YAML)
Create Task Group in Build Pipeline
Go to your Build pipeline > Edit Pipeline > Click Jobs and task Link
Right now we have following 4 Tasks
Make sure to Unlink these tasks first
Shift + Click all task you want to group and right click on it and select ‘Create task group’
Give Name and click Create
We can see only one Task Group here
Use Above Task Group in Release Pipeline
Go to Release Pipeline > Edit Pipeline > Click on Job and task link in Dev
Press + sign next to Agent Job
Search your Task group Name in text box ‘.net build’
Click Add to add this Task group into your Release Pipeline