Add an option to block on manual jobs only if they're run
Problem to solve
Suppose I have a manual job that runs additional long-running tests. This manual job isn't always run, and that's okay. Merge requests should still show a passed pipeline, and "merge when pipeline succeeds" should work. However, if the job was run and failed, I'd like the MR to show a failed pipeline. Additionally, if the job was started and is currently running, I'd like "merge when pipeline succeeds" to block.
I'm proposing a
false-if-run option for
allow_failure on manual jobs.
|Failed job pipeline status in MRs||CI build passed with warnings||fail||fail|
|Blocks subsequent stages||no||yes||yes*|
|Merge when pipeline succeeds||ignores job||blocks until run & pass||blocks if running/failed|
Note: The only way this makes sense for subsequent stages is if the behavior gets inherited by them. If you choose not to run a manual job and that blocks a stage, the purpose of
false-if-run is defeated if the MR goes into a blocked/manual state.