Microsoft Certified: DevOps Engineer ExpertDesign and implement pipelinesMedium
A DevOps team is managing release pipelines in Azure DevOps. They have a standard set of tasks (e.g., database migration, secret rotation, service restart) that need to be executed consistently across multiple stages in various release pipelines. To improve reusability, maintainability, and ensure consistency, the team wants to encapsulate these tasks into a single, versioned unit. Which Azure DevOps feature is designed for this purpose?
- AEnvironments
- BDeployment groups
- CTask groups
- DVariable groups
Show answer & explanationAnswer & explanation
Correct answer: C. Task groups
Task groups in Azure DevOps allow you to encapsulate a sequence of tasks into a single reusable unit. This improves reusability, simplifies pipeline definitions, and ensures consistency across multiple pipelines and stages by providing a versioned component.
Why the other options are wrong
- A. Environments represent a collection of resources targeted by a pipeline, not a reusable set of tasks.
- B. Deployment groups are used to logically group target machines for deployment, not to encapsulate task sequences.
- D. Variable groups store values that can be used across multiple pipelines, but they don't encapsulate task logic.
Task Group
A Task Group in Azure DevOps is a sequence of tasks that can be encapsulated into a single reusable task in a build or release pipeline. It helps in standardizing and centralizing common deployment or build logic.
- Increases reusability and maintainability of pipelines.
- Ensures consistency across multiple pipelines.
- Can be versioned and managed like other pipeline components.
Memory trick: Tasks grouped together make a powerful, reusable unit.