4
votes

Jenkins 1.6 - 2.x

I have a job which runs every minute or 2 and sometimes the build fails and the next builds passes. For build failures, I'm using Editable Email Notification plugin in Jenkins.

Either using this plugin or any other plugin/way, can I somehow configure Jenkins job to send me a failed build notification ONLY if the last 3 consecutive builds have failed? It's no fun to watch these builds fail and then succeed in the next run so I'm trying to reduce the frequency of such failure notifications OR make it more intelligent.

I have mentioned a comment for a new feature request here: https://wiki.jenkins.io/display/JENKINS/Email-ext+Template+Plugin?focusedCommentId=132940540#comment-132940540 but looking if someone have tried / achieved something similar.

2

2 Answers

6
votes

Email-ext plugin has a Nth failure trigger (Failure - X) but you should really do something about the random failures

0
votes

As it's mentioned in accepted answer - Email-ext have that feature.

I recently had to use "Failure - X", but message destination had to be Slack channel - not email. In such a situation, you can install on Slack plugin, which generate special email address for given Slack channel. It will allow you to send emails to Slack. Then you use Email-ext on Jenkins so you'll get slack msg after X failed builds.