在多阶段管道上点击新功能“要运行的阶段”,我收到了错误消息“无法加载管道的阶段。”这个功能是否仍处于预览状态?
以下是Yaml文件:
- 流水线文件
- 构建模板
- 部署模板未粘贴,因为它几乎与构建相同
================== 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....```
stages
之外定义的变量组导致了这个错误。如果你将变量组移动到每个阶段内部,该功能将再次正常工作。 - Levi Lu-MSFT