Show a Jenkins pipeline stage as failed without failing the whole job
Here's the code I'm playing with node { stage 'build' echo 'build' stage 'tests' echo 'tests' stage 'end-to-end-tests' def e2e = build job:'end-to-end-tests', propagate: false result = e2e.result if (result.equals("SUCCESS")) { stage 'deploy' build 'deploy' } else { ?????? I want to just fail this stage } } Is there any way for me to mark the 'end-to-end-tests' stage as failed without failing the whole job? Propagate false just always marks the stage as true, which is not what I want, but Propagate true marks the job as failed which I also don't want. Stage takes a block now, so wrap the stage