【发布时间】:2020-03-29 00:20:46
【问题描述】:
我正在创建一个多阶段 Azure DevOps (yaml) 管道,该管道使用对其他模板的多个引用。正如您在下面的管道中看到的,我必须为我的build-client-steps.yml 和distribute-client-steps.yml 文件提供相同的矩阵。该矩阵用于我的管道策略。
有没有办法将此矩阵声明为我的azure-pipelines.yml 文件的变量?
stages:
- stage: build
displayName: Build & validate
jobs:
- template: pipelines/templates/build-client-steps.yml
parameters:
matrix:
base-ios-prod:
app: string
artifact: string
variant: string
os: ios
distribution: string
base-android-prod:
app: string
artifact: string
variant: string
os: android
distribution: string
keystore_password: '$(keystore_password)'
keystore_alias: '$(keystore_alias)'
APPLE_CERTIFICATE_SIGNING_IDENTITY: '$(APPLE_CERTIFICATE_SIGNING_IDENTITY)'
APPLE_PROV_PROFILE_UUID: '$(APPLE_PROV_PROFILE_UUID)'
teamId: '$(teamId)'
P12Password: '$(P12Password)'
- template: pipelines/templates/build-server-steps.yml
- template: pipelines/templates/build-infra-steps.yml
- template: pipelines/templates/build-sap-steps.yml
- stage: prepareBase
displayName: Prepare base infra
dependsOn: build
jobs:
- template: pipelines/templates/deploy-infra-jobs.yml
parameters:
parameterFile: string
resourceGroup: string
- stage: deployBase
displayName: Deploy base
dependsOn: prepareBase
jobs:
- template: pipelines/templates/deploy-server-jobs.yml
parameters:
resourceGroup: string
- stage: activateBase
displayName: Activate base
dependsOn: deployBase
jobs:
- template: pipelines/templates/swap-app-jobs.yml
parameters:
parameterFile: string
resourceGroup: string
- template: pipelines/templates/distribute-client-jobs.yml
parameters:
matrix:
base-ios-prod:
app: string
artifact: string
variant: string
os: ios
distribution: string
base-android-prod:
app: string
artifact: string
variant: string
os: android
distribution: string
【问题讨论】:
标签: azure-devops yaml azure-pipelines