Hello,
I’m having an issue with getting the pipeline status to become failed when one of its job has failed, in the case of DAG and a manual job. This is my .gitlab-ci.yml:
stages:
- build
- deploy
build_a:
stage: build
script:
- echo "build a"
deploy_a:
stage: deploy
needs: [build_a]
script:
- echo "deploy a"
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: manual
build_b:
stage: build
script:
- echo "build b"
- ./fail-now
And this is what I see in the gitlab UI:
What I would like is that this pipeline would become red because of the failed build_b
job. Is this possible?
I’ve noticed that I can achieve this by adding allow_failure: true
to the manal deploy_a
job, but this is unwanted because I really want the pipeline to stop if deploy_a
actually fails (e.g. there might following jobs dependent on deploy_a
that shouldn’t be triggered if deploy_a
actually fails).
Any advice is welcome!
Thanks
Peter