Hi all, I am trying to do some slack integration whereby in a declarative post failure section we want to send to slack the exception message that triggered the failure.
Something like:
pipeline {
stages {
...
}
post {
failure {
slackSend(message: "Failed due to ${cause.toString()}")
}
}
}
What I am noticing is that it seems impossible to get the active exception/failure in a post section. Is there any trick that I am missing?
-Josh