Microsoft Certified: DevOps Engineer ExpertDesign and implement source controlHard
A company uses Azure DevOps for its source control and build pipelines. They have a complex build process that involves multiple steps, including code analysis, compilation, and unit testing. Several of these steps are identical across multiple build pipelines. The team wants to standardize these common steps to ensure consistency, reduce duplication, and simplify maintenance. Changes to these standardized steps should propagate automatically to all pipelines that use them. Which Azure DevOps feature should they implement?
- AYAML templates
- BVariable groups
- CTask groups
- DAgent pools
Show answer & explanationAnswer & explanation
Correct answer: C. Task groups
Task groups in Azure DevOps allow you to encapsulate a sequence of tasks into a reusable unit. When a task group is updated, all pipelines using that task group automatically receive the updates, ensuring consistency and simplifying maintenance. This directly addresses the requirement for standardizing common steps and propagating changes automatically.
Why the other options are wrong
- A. YAML templates allow reuse of YAML snippets, but changes to a template require pipelines to be re-run (or re-queued if a new commit is made that triggers them) to pick up changes; task groups are directly linked and update automatically for existing pipelines.
- B. Variable groups store reusable variables, not sequences of tasks.
- D. Agent pools manage the availability of build agents, not common build steps.
Azure Pipelines Task Groups
A feature in Azure DevOps that allows you to combine a sequence of tasks into a single reusable task, which can then be used in multiple build or release pipelines.
- Encapsulates common build/release logic.
- Changes to a task group automatically update all pipelines using it.
- Reduces duplication and improves consistency.
- Can include input parameters for customization.
Memory trick: Task groups package steps for reuse and auto-update.