Microsoft DevOps Engineer Expert AZ-400 Practice Question

You are standardizing your organization's Azure Pipelines by extracting a frequently used job into a reusable YAML template named build-dotnet.yml. The job relies on values that different teams keep in their own variable groups. You want the calling pipeline to decide at queue time which variable group the template should import, without having to modify the template itself for every team.

Which approach should you implement inside build-dotnet.yml so that the same template can be reused with any variable group name chosen by the caller?

  • Read the group name from a secure environment variable that each team sets on the agent machine.

  • Declare a string parameter such as parameters: - name: varGroupName and import the group with variables:

    • group: ${{ parameters.varGroupName }}
  • Reference the variable group name through a runtime variable like $(varGroupName) inside the variables section.

  • Convert the job into a task group instead of a YAML template and set the variable group as a task group parameter.

Microsoft DevOps Engineer Expert AZ-400
Design and implement build and release pipelines
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot