Admittedly I’m not very well-versed in Jenkins, but after combing through some docs…
If the result of a failed quality gate is that the pipeline gets a status of ‘aborted’, could you use the aborted condition in a post section? It’s also my undestanding from those docs that you can put a post-block within a stage, not just at the end of the pipeline, so you could still preserve information about the stage to send to Slack.
May I ask what your specific aversion to using a POST section is?
I was actually reffering to a POST section for the stage because I’m already using the global POST, and I didn’t want to have two slack messages sent, one from each POST failure. But anyway I worked around it for now.
Julian’s waitForQualityGate enhancement would be great to have.
@Julien_HENRY, does abortPipeline: true set currentBuild to FAILURE?