Hi Team,
I’m trying to set up a GitLab Pipeline which has two stages A and B.
B should execute on_failure but whenever I set allow_failure: true for job A.
it doesn’t execute job B. If I set the allow_failure: false, then my job B gets executed.
Usecase: manual jobs that won’t prevent merging if not run (default allow_failure: true) but that should trigger a cleanup job in case they are triggered and failed
Usecase: A way to signal to later jobs that they do not need to run. Everything is fine without them.
The same goes with when: on_success. The allow_failure flag makes these useless.
In our case we do some git checks to see if we can avoid the need to trigger a subpipeline. This works great, it’s clear in the UI what happened, lightweight YAML definition, fantastic.
The only trouble is that now the main pipeline is marked as a failure and merge is blocked. The question is why would an allowed failure be considered “success”?