Send e-mail to committers on failure (Git)

4,379 views
Skip to first unread message

Andreas Sommer

unread,
Feb 16, 2013, 10:02:59 PM2/16/13
to jenkins...@googlegroups.com
I'm trying to send "Build failed" notifications to the Git committers automatically. In "Post build actions", I added e-mail notification without default recipients but checked both "Send e-mail for every unstable build" and "Send separate e-mails to individuals who broke the build". However no mail is sent by Jenkins (no mail server issue, I'm using smtp4dev).

I tried the email-ext plugin as well, but the documented option "Send to Committers" does not show up in the configuration even after I enabled "Override Global Settings", saved and reloaded the config page.

Any idea?

Slide

unread,
Feb 16, 2013, 10:29:54 PM2/16/13
to jenkins...@googlegroups.com
In email-ext, you need to setup the email for the project as well, not just the global config. You need to add Extended Email Notification to the list of post-build publishers and setup what triggers you want. Take a look at the wiki page [1] and it should give you the info you need.

slide




--
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/groups/opt_out.
 
 



--
Website: http://earl-of-code.com

Andreas Sommer

unread,
Feb 17, 2013, 10:10:45 AM2/17/13
to jenkins...@googlegroups.com
Okay, that worked. From the docs, I thought the trigger settings are global when in fact they're project-specific.

However now I get "An attempt to send an e-mail to empty list of recipients" for failing builds. I would like to automatically take the e-mail adresses from the Git commits without having to create Jenkins users. Is that possible, or do I have to create users? If yes, does the name or the e-mail address have to match between Git commit and Jenkins user?

Thanks!

Slide

unread,
Feb 17, 2013, 10:51:44 AM2/17/13
to jenkins...@googlegroups.com
If the git plugin has an implementation of a MailAddressResolver, it should be able to grab the information from the commits, but I am not incredibly family with the Git plugin. What options do you have turned on in the trigger? You probably want to enable "Send to Developers" at a minimum to include those who changed something.

Andreas Sommer

unread,
Feb 17, 2013, 5:52:08 PM2/17/13
to jenkins...@googlegroups.com
There's no option "Send to Developers", but I turned on both "Send to Recipient List" and "Send to Committers" for the triggers Unstable/Failure.

Slide

unread,
Feb 17, 2013, 11:26:02 PM2/17/13
to jenkins...@googlegroups.com
Yeah, that's the one.

Andreas Sommer

unread,
Feb 18, 2013, 2:11:02 AM2/18/13
to jenkins...@googlegroups.com
But still the recipients list stays empty and is not pulled from the git commit author.


Andreas Sommer

unread,
Feb 23, 2013, 9:06:32 AM2/23/13
to jenkins...@googlegroups.com, andreas....@googlemail.com
It seems to work now with the latest version of the Git Plugin :)

Eduardo Dias

unread,
Feb 26, 2013, 7:11:56 AM2/26/13
to jenkins...@googlegroups.com
Hi Andreas,

I am trying to do the same that you have mentioned in this post, but I don´t
receive the email when a failure occurs and I have checked to send email to
committers.

I have updated the Git plugin, but didn´t work.

Please could share with me what you did to put it working?

Regards

Eduardo



--
View this message in context: http://jenkins.361315.n4.nabble.com/Send-e-mail-to-committers-on-failure-Git-tp4655962p4657148.html
Sent from the Jenkins users mailing list archive at Nabble.com.

Andreas Sommer

unread,
Mar 1, 2013, 1:24:23 PM3/1/13
to jenkins...@googlegroups.com
The latest email-ext plugin and Git plugin should work fine. Take a look at your build console log, does it give you an error, e.g. SMTP server connection failed? It should also tell you to which recipients it tries to send an e-mail. Also, with default options I think it won't send a mail for "still failing", so you have to make your build suceed, then make it fail so that the state is "failing" instead of "still failing". Or add the respective triggers to always send a mail.

Eduardo Dias

unread,
Mar 4, 2013, 4:41:18 PM3/4/13
to jenkins...@googlegroups.com
Thanks Andreas, I tried and worked

Eduardo


2013/3/1 Andreas Sommer <andreas....@googlemail.com>
--
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/groups/opt_out.
 
 



--

Atenciosamente,

Eduardo

James Chao

unread,
Jul 31, 2014, 6:45:20 PM7/31/14
to jenkins...@googlegroups.com
Hi,

I'm using the "GitHub Pull Request Builder" plugin, and the email list is empty....I am updated to the latest versions of the various plugins, but it doesn't know.

Is anyone else using that plugin and able to get email-ext to work?


James
Reply all
Reply to author
Forward
0 new messages