I am trying to set the variable template to use based on if the branch is dev, release or master using the config below:
variables:
- template: ../vars/global.yml
- ${{ if eq( variables.isDev , 'True' ) }}:
- template: ../vars/dev.yml
- ${{ if eq( variables.isRelease , 'True' ) }}:
- template: ../vars/stage.yml
- ${{ if eq( variables.isMaster , 'True' ) }}:
- template: ../vars/prod.yml
stages:
- template: ../stages/build.yml
- template: ../stages/deploy.yml
parameters:
dmEnvironment: $(dmEnvironment)
environment: $(environment)
But I am getting the error Job Dev: Environment $(dmEnvironment) could not be found. The environment does not exist or has not been authorized for use.
So it seems like it’s not recognizing my variable. How can I get it to read the actual value?