Skip to content

Commit

Permalink
fix(pipelines): var group conditioal must use compile time syntax (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
julie-ng authored Nov 4, 2021
1 parent 7ba5c65 commit 8045ea4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions azure-pipelines/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,13 @@ pool:

variables:
- template: vars/global.yaml
- ${{ if eq(variables.isMain, 'True') }}:

# Conditional uses ${{ }} syntax in order to be processed at compile time
# in order to work for loading variable groups. For details see:
# https://docs.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch#understand-variable-syntax
- ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/main') }}:
- group: e2e-gov-demo-dev-kv
- ${{ if eq(variables.isProduction, 'True') }}:
- ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/production') }}:
- group: e2e-gov-demo-kv

stages:
Expand Down

0 comments on commit 8045ea4

Please sign in to comment.