rerx
rerx

Reputation: 1183

Jenkins e-mail notification only for first failing commit

For my Jenkins job I would like to have Jenkins send e-mails under two conditions:

  1. The build was fine before, but now it fails.
  2. The build failed before, but now it is fine.

I do not want it to send e-mails for any additional failing builds between (1) and (2).

I would have expected that having the setting "Send e-mail for every unstable build" unchecked would prevent just that, but I receive e-mail for every single failed build.

config screen shot

How can I achieve my desired behavior? Is this a bug in Jenkins (2.121.2) or the Mailer plugin (1.21)?

Upvotes: 0

Views: 1037

Answers (1)

Vighnesh Pai
Vighnesh Pai

Reputation: 1843

There is a better plugin for sending emails on certain conditions on Jenkins plugin site: https://wiki.jenkins.io/display/JENKINS/Email-ext+plugin

Try finding Editable email in post-build actions or install it via Jenkins manage plugins options.

Below is a screenshot which is part of the Editable Email notification post-build task:

enter image description here

Upvotes: 1

Related Questions