When I am referring to the doc section needs:pipeline:job
It only shows the example for download artifacts from a job in its parent pipeline. However, it is clearly stated that we can download artifacts from a job in another child pipeline in the same parent-child pipeline hierarchy.
Could you please provide an example for that? I am really interested in using the feature.
2 Likes
I’m also interested in this feature, and I’m struggling to see how it’s currently possible.
needs:pipeline:job
requires the CI_PIPELINE_ID
of the source pipeline for the artifacts and I can’t find any information about passing this data between sibling child pipelines or from a child pipeline to a parent.
Does anyone have any ideas for how this might be possible? Otherwise, I’ll open an issue in the tracker to fix the docs and possibly a feature request for this feature.
1 Like
Yeah, I’m curious about this – I can pass a job ref from parent to child in a trigger job by passing the ID
variables:
PARENT_PIPELINE_ID: $CI_PIPELINE_ID
and then ref the ID in the child job that needs the parent job’s artifacts
needs:
- pipeline: $PARENT_PIPELINE_ID
job: generate-particular
But trying to get a sibling to get the artifacts from another sibling aren’t well documented, though the docs say
A child pipeline can download artifacts from a job in its parent pipeline or another child pipeline in the same parent-child pipeline hierarchy.
But how?