# HG changeset patch # User Jeff Hammel # Date 1343767367 25200 # Node ID 72645086a0b7b3eda32280affe2e10cbed1ec143 # Parent 13107cdc1e335a350eed9808043a2b7f14723615 * hook up email, i hope * fix failing tests, i also hope diff -r 13107cdc1e33 -r 72645086a0b7 autobot/template.py --- a/autobot/template.py Tue Jul 31 13:15:40 2012 -0700 +++ b/autobot/template.py Tue Jul 31 13:42:47 2012 -0700 @@ -50,7 +50,7 @@ Variable('ircHost', 'IRC host', default='irc.mozilla.org'), Variable('ircChannels', 'channels for the IRC bot ("-" for none)', default='#ateam-test'), # use #ateam in production Variable('domain', 'autobot domain name', default='localhost'), - Variable('recipients', 'email recipients for all projects') + Variable('recipients', 'email recipients for all projects', '') ] def pre(self, variables, output): diff -r 13107cdc1e33 -r 72645086a0b7 autobot/template/master/master.cfg --- a/autobot/template/master/master.cfg Tue Jul 31 13:15:40 2012 -0700 +++ b/autobot/template/master/master.cfg Tue Jul 31 13:42:47 2012 -0700 @@ -121,7 +121,22 @@ c['status'].append(words.IRC(host=irc_host, nick=nick, channels=config.master['channels'])) -# email notification +# email notification; see +# http://buildbot.net/buildbot/docs/latest/reference/buildbot.status.mail.MailNotifier-class.html +# http://buildbot.net/buildbot/docs/0.7.1/#Defining-Status-Targets +fromaddr = config.master.get('email', '') +recipients = config.master.get('recipients', None) +if recipients: + recipients = recipients.split() +else: + recipients = [] +if fromaddr: + from buildbot.status import mail + m = mail.MailNotifier(fromaddr=fromaddr, + mode=["problem"], + extraRecipients=recipients + sendToInterestedUsers=True) + c['status'].append(m) # autolog #from autobot.status import autolog