AZ-400 · Question #443
You have a project in Azure DevOps named Project1. You need to ensure that all new pipelines in Project1 execute three specific tasks during pipeline execution. What should you create?
The correct answer is A. a task group. To ensure all new pipelines in an Azure DevOps project execute a consistent set of three specific tasks, you should create a task group.
Question
Options
- Aa task group
- Ba JSON template
- Ca YAML template
- Da PowerShell task
How the community answered
(35 responses)- A86% (30)
- B9% (3)
- C3% (1)
- D3% (1)
Why each option
To ensure all new pipelines in an Azure DevOps project execute a consistent set of three specific tasks, you should create a task group.
A task group in Azure DevOps allows you to encapsulate a sequence of pipeline tasks into a single reusable unit. This enables developers to easily incorporate the predefined set of three tasks into any new pipeline, ensuring consistency and reducing duplication.
A JSON template is not the standard Azure DevOps construct for grouping and reusing a set of pipeline tasks; YAML templates are more relevant for pipeline structure, but task groups specifically bundle tasks.
While a YAML template can be used for reusability, a task group is specifically designed to abstract and reuse a sequence of pipeline tasks as a single, callable unit, which is a more direct solution for grouping tasks.
A PowerShell task executes a single script and does not inherently group multiple, potentially different, types of Azure DevOps tasks into a reusable component.
Concept tested: Azure DevOps reusable tasks (Task Groups)
Source: https://learn.microsoft.com/en-us/azure/devops/pipelines/library/task-groups?view=azure-devops
Community Discussion
No community discussion yet for this question.