hey if in case you are still facing the issue, You can use jenkins Editable Email Notification plugin and in advanced settings you will have an option of failure-X where you can specify after how many failures you need to send the email. Old versions of jenkins may not be helping with this. So you can use the following PRESEND SCRIPT in editable email-notification
try { //used try catch because NAGINATOR_COUNT will be a undefined property for first build cancel = true if ($NAGINATOR_COUNT && $NAGINATOR_COUNT == 2) { //where after 2nd retry it will trigger email cancel = false } } catch (e) { cancel = true } Hope this answers On Wednesday, August 6, 2014 at 2:14:46 AM UTC+5:30, Craig wrote: > > I’m trying to get Jenkins to send email to recipients only after the last > attempted retry of a job fails. In other words, I don’t want them getting > email for all the failures; just if they **all** fail. Is there a way to > do that with the email-ext plugin and naginator? > > > > Thanks. > > Craig > > > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/e004a326-bc74-4386-badf-63c26ccfb201%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.