Clicking on the new feature "Stages to run" on a multi-stage pipeline, I got the error message "Unable to load the pipeline's stages." Is this feature still in a sort of preview status?
Yaml files below:
================== azure-pipelines.yml =============
trigger: none
variables:
- group: var-group
- name: PREFIX
value: xyz
stages:
- stage: build_and_push
displayName: Build/Push stage
jobs:
- template: build-template-job.yml
parameters:
countries:
- name: Austria
country_code: AT
- name: Switzerland
country_code": CH
- stage: deploy
displayName: Deploy stage
jobs:
- template: deploy-template-job.yml
parameters:
countries:
- name: Austria
country_code: AT
- name: Switzerland
country_code": CH
================== build-template-job.yml =============
parameters:
countries: []
jobs:
- job: Build_1
pool:
vmImage: 'Ubuntu-16.04'
continueOnError: false
displayName: "Building 1"
steps:
- task: HelmInstaller@0
displayName: 'Install Helm'
inputs:
helmVersion: 2.14.3
checkLatestHelmVersion: false
- bash: helm package
--version 1.0.0
--destination $(build.artifactStagingDirectory)
helm/
displayName: 'Packaging the heml chart....'
- ${{ each country in parameters.countries}}:
# more steps....```
SOLVED: I moved the group definition on stage level instead of at the top of azure pipeline file.
Example:
stages:
- stage: build
variables:
- group: my-var-group
- stage: deploy
variables:
- group: my-var-group