'Azure Devops pipeline: import variables from template and declare variables in the same variables block
Is there any way that we can mix the variable reuse with template and variable declaration in the same variables block ?
Something like this:
variables:
- template: vars.yml # Template reference
anotherVar: http://$(oneVarFromVarsYml)/xxx
After the test, it doesn't work, I would like to know if you have a workaround.
I know I can define the var anotherVar in the same template vars.yml, but I have the needs to define it directly here not in the template.
The below official Azure Devops docs gives only how to import vars from a template, but it doesn't provide an example for case we have mixed template vars and direct vars: https://docs.microsoft.com/en-us/azure/devops/pipelines/process/templates?view=azure-devops#variable-reuse
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
