I am trying to achieve the following pattern in a CI pipeline:
If and only if job B or C, which depends on B, failed, I want to play the failure job. If both jobs succeed, I don’t want to play the failure job.
I tried with “needs” and “when” but I didn’t find the right solution.
My last idea is to use “after_script” but it seems too complex for a basic need.
Does anyone have an idea or have they encountered this need before?