How do I know which stage of jenkins pipeline has failed
问题 In my Jenkins pipelines I generally use post declarative function to send me an email incase the pipeline has failed. A simple syntax of the post function is as under: post { failure { mail to: 'team@example.com', subject: "Failed Pipeline: ${currentBuild.fullDisplayName}", body: "Something is wrong with ${env.BUILD_URL}" } } In the above email, I also want to mention which stage (lets say the pipeline has 5 to 6 stages) of the pipeline has failed. How can I do that? Any help is much