I have email-ext plugin configured on Jenkins. Currently I'm sending mails using following triggers.
What I need to know, is there a way to add a custom trigger to send mails on a specific build failure
assume that I need to send a mail on build Failure-4th
You can use Trigger Scripts in groovy to define before or after the build if the email must be send or not. There are four objects added to the model for the script to use to interact with the build.
AbstractBuild
AbstractProject
PrintStream
that can be used to log messages to the build log. The last line in the script should resolve to a boolean true
or false
.
So I guess you can do what you want if you use a Groovy Script. For more info check: e-mail ext
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.