5
votes

In Azure Devops Variable Scope Value Release mean? In the same drop down there are other stages that mean it only applies for that stage. Does Release mean it applies to all stages?

2

2 Answers

5
votes

Yes, when a variable scope is set to Release it allows the value to be used across all stages and tasks in the release pipeline. If scope is set to a specific stage, then it is available in that stage only.

Documentation: https://docs.microsoft.com/en-us/azure/devops/pipelines/release/variables?view=azure-devops&tabs=batch#custom-variables

2
votes

Does Release mean it applies to all stages?

Yes. While you set the scope as Release, it will cover the all of scope during this release, include all of stages.

enter image description here

You can see this from the doc.

And also, if you has a variable with the same name in multiple scopes, it will be used according the following precedence:

enter image description here

1 means the highest precedence.

This has been explained detailed in Expansion of variables, you can refer it for more details.