| # This is Melange's buildmaster config file. It must be installed as |
| # 'master.cfg' in the buildmaster's base directory. |
| |
| |
| import private |
| import extensions |
| |
| # This is the dictionary that the buildmaster pays attention to. We also use |
| # a shorter alias to save typing. |
| c = BuildmasterConfig = {} |
| |
| ####### BUILDSLAVES |
| |
| # The 'slaves' list defines the set of recognized buildslaves. Each element is |
| # a BuildSlave object, specifying a unique slave name and password. The same |
| # slave name and password must be configured on the slave. |
| |
| from buildbot.buildslave import BuildSlave |
| c['slaves'] = [BuildSlave('example-slave', private.slave_password |
| notify_on_missing=private.ml_address)] |
| |
| # 'slavePortnum' defines the TCP port to listen on for connections from slaves. |
| # This must match the value configured into the buildslaves (with their |
| # --master option) |
| |
| c['slavePortnum'] = private.slavePortnum |
| |
| ####### CHANGESOURCES |
| |
| # the 'change_source' setting tells the buildmaster how it should find out |
| # about source code changes. Here we point to the buildbot clone of pyflakes. |
| |
| c['change_source'] = [] |
| |
| ####### SCHEDULERS |
| |
| # Configure the Schedulers, which decide how to react to incoming changes. In this |
| # case, just kick off a 'runtests' build |
| |
| from buildbot.schedulers.basic import SingleBranchScheduler |
| from buildbot.schedulers.forcesched import ForceScheduler |
| from buildbot.changes import filter |
| c['schedulers'] = [] |
| c['schedulers'].append(SingleBranchScheduler( |
| name='all', |
| change_filter=filter.ChangeFilter(branch_re='.*'), |
| treeStableTimer=None, |
| builderNames=['runtests'], |
| fileIsImportant=extensions.isImportant |
| )) |
| |
| c['schedulers'].append(ForceScheduler( |
| name='force', |
| builderNames=['runtests'], |
| )) |
| |
| ####### BUILDERS |
| |
| # The 'builders' list defines the Builders, which tell Buildbot how to perform a build: |
| # what steps, and which slaves can execute them. Note that any particular build will |
| # only take place on one slave. |
| |
| from buildbot.process.factory import BuildFactory |
| from buildbot.config import BuilderConfig |
| |
| factory = BuildFactory() |
| factory = extensions.populateBuildFactory(factory) |
| |
| c['builders'] = [] |
| c['builders'].append( |
| BuilderConfig(name='runtests', |
| slavenames=['example-slave'], |
| factory=factory)) |
| |
| ####### STATUS TARGETS |
| |
| # 'status' is a list of Status Targets. The results of each build will be |
| # pushed to these targets. buildbot/status/*.py has a variety to choose from, |
| # including web pages, email senders, and IRC bots. |
| |
| c['status'] = [] |
| |
| from buildbot.status import html |
| from buildbot.status.web import authz |
| from buildbot.status.web import auth |
| from buildbot.status.mail import MailNotifier |
| |
| mail_notifier = MailNotifier(fromaddr=private.buildbot_email, |
| sendToInterestedUsers=False, |
| extraRecipients=[private.ml_address], |
| lookup=extensions.UsersAreEmails()) |
| |
| c['status'].append(mail_notifier) |
| |
| authz_cfg=authz.Authz( |
| # change any of these to True to enable; see the manual for more |
| # options |
| auth=auth.BasicAuth([(private.web_username, private.web_password)]), |
| forceBuild='auth', |
| forceAllBuilds=False, |
| pingBuilder=False, |
| stopBuild='auth', |
| cancelPendingBuild=True, |
| stopAllBuilds='auth', |
| ) |
| |
| c['status'].append(html.WebStatus(http_port=8020, authz=authz_cfg)) |
| |
| c['status'].append(html.WebStatus(http_port=private.push_notification_port, |
| allowForce=True, |
| change_hook_dialects={ |
| 'googlecode': {'secret_key': private.googlecode_secret_key, |
| 'branch': 'master'}})) |
| |
| ######## IRC TARGETS |
| |
| from irc import ExtendedIRC |
| irc = ExtendedIRC('irc.freenode.net', 'buildbot', |
| channels=['melange'], |
| allowForce=True, |
| ) |
| c['status'].append(irc) |
| |
| ####### PROJECT IDENTITY |
| |
| # the 'title' string will appear at the top of this buildbot |
| # installation's html.WebStatus home page (linked to the |
| # 'titleURL') and is embedded in the title of the waterfall HTML page. |
| |
| c['title'] = 'Melange' |
| c['titleURL'] = 'http://code.google.com/p/soc' |
| |
| # the 'buildbotURL' string should point to the location where the buildbot's |
| # internal web server (usually the html.WebStatus page) is visible. This |
| # typically uses the port number set in the Waterfall 'status' entry, but |
| # with an externally-visible host name which the buildbot cannot figure out |
| # without some help. |
| |
| c['buildbotURL'] = private.buildbot_url |
| |
| ####### DB URL |
| |
| c['db'] = { |
| # This specifies what database buildbot uses to store its state. You can leave |
| # this at its default for all but the largest installations. |
| 'db_url' : 'sqlite:///state.sqlite', |
| } |