How to properly implement a multi-project pipeline with 2 upstreams projects
Bit of context:
The delivered application is made of multiple components, each one versioned separately and then having its own pipeline building the artifacts.
These artifacts must be packaged together to create the deliverable.
From my understanding, making use of a multi-projects pipeline could do the trick, by making use of
needs:projects
On the downstream pipeline, I then would like to have:
downstream-pipeline-ab:
variables:
needs:
- project: upstream-project-a
job: upstream-job-a
ref: $UPSTREAM_REF_A # declared as variable in the trigger-job-a
artifacts: true
- project: upstream-project-b
job: upstream-job-b
ref: $UPSTREAM_REF_B # declared as variable in the trigger-job-b
artifacts: true
However, it seems impossible to both provision UPSTREAM_REF_A
and UPSTREAM_REF_B
as the downstream pipeline is obviously launched by one upstream at the time not both.
What I’m doing wrong ? How should I do to get the latest artifacts from pipeline A and B ?
Does simply multi-projects allow to fetch artifacts from multiple repos ?
And if not, what would be the gitlab-way to implement something solving my initial problem ?
Thank you in advance !