First attempt of a mail notifier

This commit is contained in:
Sergio Durigan Junior 2014-12-21 19:38:24 -05:00
parent 57326f7ef2
commit dea6ebf05f

View file

@ -102,15 +102,32 @@ c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg))
#c['status'].append(words.IRC(host="irc.yyz.redhat.com", nick="sdj-gdbbot",
# channels=["#gdbbuild"]))
#from buildbot.status import mail
#mn = mail.MailNotifier(fromaddr="sergiodj@redhat.com",
# sendToInterestedUsers=False,
# extraRecipients=['gdb-testers@sourceware.org'],
# relayhost="smtp.corp.redhat.com",
# mode=('failing'),
# smtpPort=25)
def MessageGDBTesters (mode, name, build, results, master_status):
"""This function is responsible for composing the message that will be
send to the gdb-testers mailing list."""
ss_list = build.getSourceStamps ()
subj = "Failures on %s" % name
text = list ()
parser = DejaResults ()
text.append ("Commit(s) tested:\n")
for ss in ss_list:
text.append ("\t%s\n" % ss.revision)
text.append ("\n")
text.append (build.getLog ('regressions').getText ())
return { 'body' : text,
'type' : 'plain',
'subject' : subj }
#c['status'].append(mn)
from buildbot.status import mail
mn = mail.MailNotifier(fromaddr = "sergiodj@redhat.com",
sendToInterestedUsers = False,
extraRecipients = ['sergiodj@redhat.com'],
# extraRecipients = ['gdb-testers@sourceware.org'],
relayhost = "smtp.corp.redhat.com",
mode = ('failing'),
smtpPort = 25)
c['status'].append (mn)
c['title'] = "GDB"
c['titleURL'] = "https://gnu.org/s/gdb"