How to matrix subsequent jobs referencing artifacts from previous matrix job?

Although I know of an undocumented way to pick one artifact from a previous matrixed job (dependencies: ["matrixed_job_name: [varName]"] CI: Specifying artifact dependencies when using `parallel: matrix:`), is there a way to make the subsequent job matrixed in a way it starts a job for each artifact from the previous job ? Each such job should pick one artifact from the previous job.

E.g.

stages:
  - build
  - deploy

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

If not it means I either have to put everything in one job or write a deploy job for each build, neither seem too clean.

@nurdofitru Welcome to the forum!

Unfortunately right now I think you need to use a different job for each matrix dependency (now documented).

I created a new issue for a feature request if you want to give it a :+1: because I didn’t see an existing one.

-James H, GitLab Product Manager, Verify:Pipeline Execution