The buildbot.status.words.IRC status target creates an IRC bot
which will attach to certain channels and be available for status
queries. It can also be asked to announce builds as they occur, or be
told to shut up.
from buildbot.status import words
irc = words.IRC("irc.example.org", "botnickname",
channels=[{"channel": "#example1"},
{"channel": "#example2",
"password": "somesecretpassword"}],
password="mysecretnickservpassword",
notify_events={
'exception': 1,
'successToFailure': 1,
'failureToSuccess': 1,
})
c['status'].append(irc)
Take a look at the docstring for words.IRC for more details on
configuring this service. Note that the useSSL option requires
PyOpenSSL. The password argument, if provided, will be sent to
Nickserv to claim the nickname: some IRC servers will not allow clients to send
private messages until they have logged in with a password. We can also specify
a different port number. Defalut values is 6667.
To use the service, you address messages at the buildbot, either
normally (botnickname: status) or with private messages
(/msg botnickname status). The buildbot will respond in kind.
If you issue a command that is currently not available, the buildbot
will respond with an error message. If the noticeOnChannel=True
option was used, error messages will be sent as channel notices instead
of messaging. The default value is noticeOnChannel=False.
Some of the commands currently available:
list buildersstatus BUILDERstatus allwatch BUILDERlast BUILDERnotify on|off|list EVENTstartedfinishedsuccessfailureexceptionxToYhelp COMMANDhelp commands to get a list of known
commands.
sourceversionAdditionally, the config file may specify default notification options as shown in the example earlier.
If the allowForce=True option was used, some addtional commands
will be available:
force build [--branch=BRANCH] [--revision=REVISION] BUILDER REASON--branch=BRANCH and --revision=REVISION.
stop build BUILDER REASONIf the categories is set to a category of builders (see categories
option in Builder Configuration) changes related to only that
category of builders will be sent to the channel.