I want to refer to template file as shown below:
variables:
- template: code-quality/code-quality-variables['Build.Repository.Name'].yml
#- template: code-quality/code-quality.yml
How can I access the template file name dynamically based on the repository name?
variables['Build.Repository.Name']
is taken as-is instead of resolving it dynamically in azure pipeline.
I also tried to do this using a parameter
- name: codeQuality
type: string
default: concat('code-quality/code-quality', '-', variables['Build.Repository.Name'])
**
Also, in parameters is it possible to refer to a dynamic variable name?
qualityEnabled: ${{variables.variables['Build.Repository.Name']_allowQuality}}
#qualityEnabled: ${{variables.repositoryname_allowQuality}}
I want the variable name variables['Build.Repository.Name']_allowQuality
to be resolved as respectiverepositoryname_allowQuality