AZ-400 · Question #439
AZ-400 Question #439: Real Exam Question with Answer & Explanation
In Azure Pipelines, variables can be defined at four scopes with the following precedence (highest to lowest): job, stage, pipeline root, and pipeline settings UI. A variable defined at a more specific/inner scope (like job) overrides the same variable defined at a broader/outer
Question
Drag and Drop Question You have an Azure Pipeline. You need to store configuration values as variables. At which four scopes can the variables be defined, and what is the precedence of the variables from the highest precedence to lowest precedence? To answer, move the appropriate scope from the list of scopes to the answer area and arrange them in the correct order. Answer:
Explanation
In Azure Pipelines, variables can be defined at four scopes with the following precedence (highest to lowest): job, stage, pipeline root, and pipeline settings UI. A variable defined at a more specific/inner scope (like job) overrides the same variable defined at a broader/outer scope (like pipeline root or pipeline settings UI), following the principle that the most local definition wins. The pipeline settings UI (variable groups or variables set in the Azure DevOps portal) has the lowest precedence and can be overridden by any inline variable definition in the YAML file.
Topics
Community Discussion
No community discussion yet for this question.