I have the following in .gitlab-ci.yml
stages:
- release
release-new-version:
image: alpine:3.18
stage: release
parallel:
matrix:
- REPO: [prod]
artifacts:
paths:
- ./${REPO}.txt
script:
- echo "this is ${REPO}" > ${REPO}.txt
deploy:prod:
stage: release
needs:
- release-new-version
variables:
PARENT_PIPELINE_ID: $CI_PIPELINE_ID
trigger:
include: prod.yml
strategy: depend
and I have the following in prod.yml
release_job:
image: alpine:3.18
needs:
- pipeline: $PARENT_PIPELINE_ID
job: release-new-version
script:
- apk add --update npm git
- ls -la
- cat version.txt
- cat prod.txt
When I run this pipeline I can see that my artifact is created, but the triggered child pipeline is failing with This job could not start because it could not retrieve the needed artifacts.
If I do not use a parallel matrix then this works, however, I will need to expand this pipeline to multiple stages, and I will need the matrix.
Is this a big or should it be possible?
Thanks