Skip to content

Make it possible to define a cartesian product/matrix for build jobs

What does this MR do?

Related to #15356 (closed)

Extends the parallel keyword to define parallel jobs with different environment variables:

deploystacks:
  stage: deploy
  script:
    - bin/deploy
  parallel:
    matrix:
      - PROVIDER: aws
        STACK:
         - monitoring
         - app1
         - app2
      - PROVIDER: ovh
        STACK: [monitoring, backup, app]
      - PROVIDER: [gcp, vultr]
        STACK: [data, processing]

The above would generate the following parallel jobs each having different values for PROVIDER and STACK:

deploystacks 1/10
deploystacks 2/10
deploystacks 3/10
deploystacks 4/10
deploystacks 5/10
deploystacks 6/10
deploystacks 7/10
deploystacks 8/10
deploystacks 9/10
deploystacks 10/10

The data with the variables used for each job as a tooltip will be added in a follow up MR

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Grzegorz Bizon

Merge request reports