This is my gitlab ci config. In the build stage the application is build in the dist
folder, which is stored as an artifact.
The next deploy stage is a trigger to run a child pipeline for the deployment.
But the dist
artifacts aren't pulled for the child pipeline, so the child job fails.
- How do I get the
dist
artifacts in the child job? - Even if the child deploy job fails, the parent pipeline shows a complete pass. I would expect to see, that at least one child has failed.
.gitlab-ci.yml
stages:
- build
- deployment
build:
stage: build
cache:
key: ${CI_COMMIT_REF_SLUG}
policy: pull
paths:
- node_modules/
artifacts:
when: always
paths:
- deployment.yml
- dist/
script:
- node ./build-app.js # creates dist folder
- node ./generate-pipeline.js # generates deployment.yml
trigger-deploy:
stage: deployment
trigger:
include:
- artifact: deployment.yml
job: build
deployment.yml
stages:
- deploy
app1-deploy:
stage: deploy
script:
- ls dist # fails, as dist folder is not existing