
Explanation:
When you set a variable with the same name in multiple scopes, the following precedence applies (highest precedence first).
- Job level variable set in the YAML file
- Stage level variable set in the YAML file
- Pipeline level variable set in the YAML file
- Variable set at queue time
- Pipeline variable set in Pipeline settings UI
https://learn.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure- devops&tabs=yaml%2Cbatch