I'm setting up a declarative pipeline for Jenkins. In my post
section, I am using slackSend
to notify my team that the build is broken. I'd like to include the failure reason. Is this available in env
or currentBuild
or something else? I haven't seen anything in the documentation, but seems like a common use case
I've seen some posts about using currentBuild.rawBuild.getLog(10)
and that works, but it is just filled with way too much information. I need to zero in on the actual exception