9

Each time a jenkins build fails I get two emails instead of one.

They have a slightly different subject text:

email 1:
"Jenkins build is still unstable: MyAppName Nightly #47"
email 2:
"Jenkins build is still unstable: MyAppName Nightly » myAppName #47"

Any ideas?

edit: it is not a multi-configuration-project, it is a maven 2/3 project

Thomas Fenzl
  • 4,342
  • 1
  • 17
  • 25
nemoo
  • 3,269
  • 4
  • 38
  • 51

2 Answers2

7

This is normal behaviour, because in a Maven job type, you always have a sub job per Maven module (automatically created by Jenkins). You can see the jobs, if you click on the link "Modules".

If you only want one email, you can use the Email Ext plugin.

dunni
  • 43,386
  • 10
  • 104
  • 99
  • How did you setup the Email Ext plugin to only send 1 email? – Josh Johnson Nov 03 '11 at 14:06
  • 1
    In the job configuration enable "Editable Email Notification", then click on Advanced, and then just select "send to recipient list" or one of the other checkboxes. If you e.g. select "send to recipient list" and "send to committer" and a committer is also in the recipient list, he gets 2 emails. Then add all triggers that you need. – dunni Nov 03 '11 at 14:38
  • Beauty. Thank you. Now I just have to get this to propagate to all 300+ jobs :) – Josh Johnson Nov 08 '11 at 14:40
  • If you have to insert the same configuration (recipient, trigger etc.), then i would highly recommend the Groovy script console. – dunni Nov 08 '11 at 18:17
  • If you already have the standard notification in all jobs, then you can convert them with the script at https://wiki.jenkins-ci.org/display/JENKINS/Convert+standard+mail+notifications+to+use+the+Mail-Ext+Publisher+plugin – dunni Nov 08 '11 at 18:17
5

So my configuration has an advanced section under the maven build and all I had to do was make sure the option: "Send e-mail for each failed module" was un-checked. And continue to use the default email notification.

lukeis
  • 1,983
  • 2
  • 19
  • 19