[154420] contrib/buildbot-test/master.cfg
larryv at macports.org
larryv at macports.org
Sat Oct 29 03:15:17 CEST 2016
Revision: 154420
https://trac.macports.org/changeset/154420
Author: larryv at macports.org
Date: 2016-10-29 03:15:17 +0200 (Sat, 29 Oct 2016)
Log Message:
-----------
buildbot: Improve creation of mail notifiers
Don't repeat ourselves by assigning to mn and appending it three times.
Modified Paths:
--------------
contrib/buildbot-test/master.cfg
Modified: contrib/buildbot-test/master.cfg
===================================================================
--- contrib/buildbot-test/master.cfg 2016-10-29 01:10:04 UTC (rev 154419)
+++ contrib/buildbot-test/master.cfg 2016-10-29 01:15:17 UTC (rev 154420)
@@ -734,43 +734,40 @@
interested_users)
if config['production']:
- # send mail about base failures to users on the blamelist
- mn = status.MailNotifier(
- fromaddr='buildbot at macports.org',
- extraHeaders={'Reply-To': 'noreply at macports.org'},
- # unless lookup is defined, users have to be configured locally
- # maybe a smarter function is needed, but lookup='' does it for now
- lookup='',
- mode=('problem'),
- builders=base_buildernames,
- #extraRecipients=['...'],
- #smtpPort=25,
- #relayhost='localhost',
- sendToInterestedUsers=True)
- c['status'].append(mn)
+ c['status'].extend((
+ # send mail about base failures to users on the blamelist
+ status.MailNotifier(
+ fromaddr='buildbot at macports.org',
+ extraHeaders={'Reply-To': 'noreply at macports.org'},
+ # unless lookup is defined, users have to be configured locally
+ # maybe a smarter function is needed, but lookup='' does it for now
+ lookup='',
+ mode=('problem'),
+ builders=base_buildernames,
+ #extraRecipients=['...'],
+ #smtpPort=25,
+ #relayhost='localhost',
+ sendToInterestedUsers=True),
+ PortsMailNotifier(
+ fromaddr='buildbot at macports.org',
+ extraHeaders={'Reply-To': 'noreply at macports.org'},
+ lookup='',
+ mode=('failing'),
+ builders=portwatcher_buildernames,
+ #extraRecipients=['...'],
+ #smtpPort=25,
+ #relayhost='localhost',
+ sendToInterestedUsers=True,
+ portMessageFormatter=portWatcherMessageFormatter),
+ # notifications about exceptions
+ status.MailNotifier(
+ fromaddr='buildbot at macports.org',
+ extraHeaders={'Reply-To': 'noreply at macports.org'},
+ mode=('exception'),
+ extraRecipients=['admin at macports.org'],
+ sendToInterestedUsers=False)
+ ))
- mn = PortsMailNotifier(
- fromaddr='buildbot at macports.org',
- extraHeaders={'Reply-To': 'noreply at macports.org'},
- lookup='',
- mode=('failing'),
- builders=portwatcher_buildernames,
- #extraRecipients=['...'],
- #smtpPort=25,
- #relayhost='localhost',
- sendToInterestedUsers=True,
- portMessageFormatter=portWatcherMessageFormatter)
- c['status'].append(mn)
-
- # notifications about exceptions
- mn = status.MailNotifier(
- fromaddr='buildbot at macports.org',
- extraHeaders={'Reply-To': 'noreply at macports.org'},
- mode=('exception'),
- extraRecipients=['admin at macports.org'],
- sendToInterestedUsers=False)
- c['status'].append(mn)
-
####### PROJECT IDENTITY #######
# the 'title' string will appear at the top of this buildbot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-changes/attachments/20161029/f3509224/attachment-0002.html>
More information about the macports-changes
mailing list