Skip to content

dependencies for matrix artifacts

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Problem to solve

As a developer, I want use artifacts built from a matrix in another matrix, so I can keep a clean and easy to read .gitlab-ci.yml file for my project.

Originally taken from a forum post

Proposal

Something like this so I can avoid creating jobs for each matrix entry.

build:
  stage: build
  script:
    - bash -c $BUILD_TARGET.sh
  parallel:
    matrix:
      - BUILD_TARGET: ['linux', 'windows', 'mac']
  artifacts:
    expire_in: 1hrs
    when: always
    paths:
      - ./builds
deploy:
  stage: deploy
  script: 
    - deploy.sh ./builds/$BUILD_TARGET
  parallel:
    matrix:
      dependencies: build
Edited by 🤖 GitLab Bot 🤖