I have a variable defined in UI:
and I want to use the value of the variable to include a template file from a folder named like the value of the variable.
variables:
- template: '../files/${{ variables.UIDefinedVariable }}/params.yml'
parameters:
Parameter1: ${{ parameters.Parameter1 }}
When I try to run the pipeline it gives the error that the file “/files/params.yml” – is not available – this because ${{ variables.UIDefinedVariable }}
has no value at compile time so is replaced with an empty string.
Is there any way to make sure that ${{ variables.UIDefinedVariable }}
does have the “FOLDER1′ value at the compile time without using a parameter instead of variable? Am I using the wrong kind of variables here?