小编def*_*rtd的帖子

将矩阵定义为多阶段 yaml 管道中的变量

我正在创建一个多阶段的 Azure DevOps (yaml) 管道,该管道使用对其他模板的多个引用。正如您在下面的管道中看到的,我必须为我的build-client-steps.ymldistribute-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:
    - …
Run Code Online (Sandbox Code Playgroud)

yaml azure-devops azure-pipelines

5
推荐指数
1
解决办法
5258
查看次数

标签 统计

azure-devops ×1

azure-pipelines ×1

yaml ×1