Skip to main content

Command Palette

Search for a command to run...

Dynamically include variable groups for each env

Published
•1 min read•View as Markdown
#build-stage.yml
stages:
  - stage: Build
    ${{ if eq(parameters.enableVariableGroups, 'true') }}:
      variables:
      - ${{ each group in parameters.variableGroupNames }}:
          - group: ${{ group }}

df

#main-pipeline.yml

stages:
- template: build-stage.yml@Templates
  parameters:
    environment: dev
    variableGroupNames: 
      - "demo-variable-group"
      - "another-demo-variable-group"