This is a status notifier which sends email to a list of recipients
upon the completion of each build. It can be configured to only send out
mail for certain builds, and only send messages when the build fails, or
when it transitions from success to failure. It can also be configured to
include various build logs in each message.
By default, the message will be sent to the Interested Users list,
which includes all developers who made changes in the build. You can add
additional recipients with the extraRecipients argument.
To get a simple one-message-per-build (say, for a mailing list), use
sendToInterestedUsers=False,
extraRecipients=['listaddr@example.org']
Each MailNotifier sends mail to a single set of recipients. To send
different kinds of mail to different recipients, use multiple
MailNotifiers.
Method Summary |
|
__init__ (self,
fromaddr,
mode,
categories,
builders,
addLogs,
relayhost,
subject,
lookup,
extraRecipients,
sendToInterestedUsers)
|
|
builderAdded(self,
name,
builder)
|
|
builderChangedState(self,
name,
state)
|
|
builderRemoved(self,
name)
|
|
buildFinished(self,
name,
build,
results)
|
|
buildMessage(self,
name,
build,
results)
|
|
buildStarted(self,
name,
build)
|
|
disownServiceParent(self)
|
|
sendMessage(self,
m,
recipients)
|
|
setServiceParent (self,
parent)
|
|
setup(self)
|
Inherited from StatusReceiver |
|
buildETAUpdate (self,
build,
ETA)
|
|
buildsetSubmitted (self,
buildset)
|
|
logChunk (self,
build,
step,
log,
channel,
text)
|
|
logFinished (self,
build,
step,
log)
|
|
logStarted (self,
build,
step,
log)
|
|
stepETAUpdate (self,
build,
step,
ETA,
expectations)
|
|
stepFinished (self,
build,
step,
results)
|
|
stepStarted (self,
build,
step)
|
Inherited from MultiService |
|
__iter__ (self)
|
|
addService (self,
service)
|
|
getServiceNamed (self,
name)
|
|
privilegedStartService (self)
|
|
removeService (self,
service)
|
|
startService (self)
|
|
stopService (self)
|
Inherited from Service |
|
__getstate__ (self)
|
|
setName (self,
name)
|
Inherited from ComparableMixin |
|
__cmp__ (self,
them)
|
|
__hash__ (self)
|
__init__(self,
fromaddr,
mode='all',
categories=None,
builders=None,
addLogs=False,
relayhost='localhost',
subject='buildbot %(result)s in %(builder)s',
lookup=None,
extraRecipients=[],
sendToInterestedUsers=True)
(Constructor)
-
- Parameters:
fromaddr -
the email address to be used in the 'From' header.
(type=string)
mode -
one of:
-
'all': send mail about all builds, passing and failing
-
'failing': only send mail about builds which fail
-
'problem': only send mail about a build which failed when
the previous build passed
(type=string (defaults to all))
categories -
a list of category names to serve status information for.
Defaults to None (all categories). Use either builders or
categories, but not both.
(type=list of strings)
builders -
a list of builder names for which mail should be sent.
Defaults to None (send mail for all builds). Use either builders
or categories, but not both.
(type=list of strings)
addLogs -
if True, include all build logs as attachments to the
messages. These can be quite large. This can also be set to a
list of log names, to send a subset of the logs. Defaults to
False.
(type=boolean.)
relayhost -
the host to which the outbound SMTP connection should be made.
Defaults to 'localhost'
(type=string)
subject -
a string to be used as the subject line of the message.
%(builder)s will be replaced with the name of the builder which
provoked the message.
(type=string)
lookup -
object which provides IEmailLookup, which is responsible for
mapping User names (which come from the VC system) into valid
email addresses. If not provided, the notifier will only be able
to send mail to the addresses in the extraRecipients list. Most
of the time you can use a simple Domain instance. As a shortcut,
you can pass as string: this will be treated as if you had
provided Domain(str). For example, lookup='twistedmatrix.com'
will allow mail to be sent to all developers whose SVN usernames
match their twistedmatrix.com account names.
(type=implementor of {IEmailLookup})
extraRecipients -
a list of email addresses to which messages should be sent (in
addition to the InterestedUsers list, which includes any
developers who made Changes that went into this build). It is a
good idea to create a small mailing list and deliver to that,
then let subscribers come and go as they please.
(type=tuple of string)
sendToInterestedUsers -
if True (the default), send mail to all of the Interested
Users. If False, only send mail to the extraRecipients list.
(type=boolean)
- Overrides:
buildbot.status.base.StatusReceiverMultiService.__init__
|