Skip to content

Instantly share code, notes, and snippets.

@ampz9
Created November 29, 2016 20:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ampz9/b45dd02ed68db7a23169147c973e9dfd to your computer and use it in GitHub Desktop.
Save ampz9/b45dd02ed68db7a23169147c973e9dfd to your computer and use it in GitHub Desktop.
from buildbot.plugins import reporters
c['services'] = []
from_addr = "do_not_reply.buildbotsunrise@company.com"
smtp_host = "mail.company.com"
# email notifier for all builds only to admin
all_mail_notifier = reporters.MailNotifier(
fromaddr=from_addr,
sendToInterestedUsers=False,
mode='all',
extraRecipients=['ampz9@company.com'],
relayhost=smtp_host, smtpPort=25, smtpUser="",
smtpPassword="")
# email notifier for failures to the team
failure_mail_notifier = reporters.MailNotifier(
fromaddr=from_addr,
sendToInterestedUsers=False, mode=('failing', 'problem', 'exception'),
extraRecipients=[
'ampz9@company.com',
'ampz10@company.com',
'ampz11@company.com'
],
relayhost=smtp_host, smtpPort=25, smtpUser="",
smtpPassword="")
c['services'].append(all_mail_notifier)
c['services'].append(failure_mail_notifier)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment