If I have an azure release pipeline with two stages, DEV and QA, and I define a variable at two scopes with different values, say myVar:Release = false
and myVar:QA = true
... is there any documented behavior as to what DEV and QA will have?
The environment variables go before the release variables.
There are also different times the variables are compiled. That is documented in the link below.
The text from the page:
When you define the same variable in multiple places with the same name, the most locally scoped variable wins. So, a variable defined at the job level can override a variable set at the stage level. A variable defined at the stage level will override a variable set at the pipeline root level. A variable set in the pipeline root level will override a variable set in the Pipeline settings UI. You can use variables with expressions to conditionally assign values and further customize pipelines. Variables are different from runtime parameters, which are typed and available during template parsing.