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-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Naginator knows the last attempt, because it knows when to give up.
What I’m asking is whether there is any integration between Naginator and one of the email plugins that will let me do this without writing scripts. It sounds like the answer is “no”.
There currently is not, but email-ext had an extension point for triggers, so someone could implement a trigger for naginator that only sent on the last attempt.
// You need some different default values so it won't be a null
def retryCount = build.envVars['NAGINATOR_COUNT'] ?: 0
def retryMaxCount = build.envVars['NAGINATOR_MAXCOUNT'] ?: 1
retryCount == retryMaxCount