Example end-to-end Governance Model from CI/CD to Azure Resource Manager. Use this project to deploy example AAD, ARM and Azure DevOps resources to learn about e2e RBAC.
MIT License
189
stars
93
forks
source link
fix(pipelines): var group conditional must use compile time syntax #40
but my guess is that variables.isMain etc. isn't immediately available because they are defined in vars/global.yaml and may not be able at compile time in the next line of code. Switching back to variables['Build.SourceBranch'] which is a predefined system variable and available from beginning.
So hoping this syntax works:
- ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/main') }}:
- group: e2e-gov-demo-dev-kv
Not 100% sure why this doesn't work
but my guess is that
variables.isMain
etc. isn't immediately available because they are defined invars/global.yaml
and may not be able at compile time in the next line of code. Switching back tovariables['Build.SourceBranch']
which is a predefined system variable and available from beginning.So hoping this syntax works: