I have a pipeline groovy script in Jenkins v2.19. Also I have a
\"Slack Notification Plugin\" v2.0.1 and \"Groovy Postbuild Plugin\".
I have successfully send a
Just in case if in Declarative Syntax,
Now, Jenkins provides post. You can check result at the end of pipeline.
https://jenkins.io/doc/book/pipeline/syntax/#post-example
Using like:
pipeline {
stages { ... }
post {
// only triggered when blue or green sign
success {
slackSend ...
}
// triggered when red sign
failure {
slackSend ...
}
// trigger every-works
always {
slackSend ...
}
}
}
It would be used in every stage also. See the document link please.