# -*- python -*- # ex: set syntax=python: # This is a sample buildmaster config file. It must be installed as # 'master.cfg' in your buildmaster's base directory. # 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", "pass")] # 'protocols' contains information about protocols which master will use for # communicating with slaves. # You must define at least 'port' option that slaves could connect to your master # with this protocol. # 'port' must match the value configured into the buildslaves (with their # --master option) c['protocols'] = {'pb': {'port': 9989}} ####### 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. from buildbot.changes.pb import PBChangeSource # interface for incoming triggers c['change_source'] = [] c['change_source'].append(PBChangeSource( port=9999, user='orchestration', passwd='orchestration')) from buildbot.changes.filter import ChangeFilter definitions_filter = ChangeFilter(category='definitions') lorry_filter = ChangeFilter(category='lorry') postbuild_filter = ChangeFilter(category='postbuild') postdeploy_filter = ChangeFilter(category='postdeploy') ####### 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="trigger_firehose_sched", change_filter=lorry_filter, treeStableTimer=None, builderNames=["1. Integration"])) c['schedulers'].append(SingleBranchScheduler( name="trigger_builders_sched", change_filter=definitions_filter, treeStableTimer=None, builderNames=["2. Build"])) c['schedulers'].append(SingleBranchScheduler( name="trigger_deploy_sched", change_filter=postbuild_filter, treeStableTimer=None, builderNames=["3. Deploy"])) c['schedulers'].append(SingleBranchScheduler( name="trigger_testing_sched", change_filter=postdeploy_filter, treeStableTimer=None, builderNames=["4. Test"])) ####### 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.steps.shell import ShellCommand from buildbot.plugins import steps, util firehose_factory = BuildFactory() firehose_factory.addStep(steps.Git( repourl='git://cu010-trove.codethink.com/cu010-trove/br6/buildslave-scripts.git', mode='incremental')) repo_name = util.Property('repo_name',default="no repo name given") firehose_cmd = ["sh","triggers/firehose_trigger.sh",repo_name] firehose_factory.addStep(ShellCommand(command=firehose_cmd)) builders_factory = BuildFactory() builders_factory.addStep(steps.Git( repourl='git://cu010-trove.codethink.com/cu010-trove/br6/buildslave-scripts.git', mode='incremental')) builders_factory.addStep(ShellCommand(command=["sh","get_definitions.sh"])) force = util.Property('force',default="") builders_cmd = ["sh","triggers/builders_trigger.sh",force] builders_factory.addStep(ShellCommand(command=builders_cmd)) deploy_factory = BuildFactory() deploy_factory.addStep(steps.Git( repourl='git://cu010-trove.codethink.com/cu010-trove/br6/buildslave-scripts.git', mode='incremental')) deploy_factory.addStep(ShellCommand(command=["sh","get_definitions.sh"])) system = util.Property('system',default="no system given") buildnumber = util.Property('buildnumber',default=0) deploy_cmd = ["sh","triggers/deploy_trigger.sh",system,buildnumber] deploy_factory.addStep(ShellCommand(command=deploy_cmd)) testing_factory = BuildFactory() testing_factory.addStep(steps.Git( repourl='git://cu010-trove.codethink.com/cu010-trove/br6/buildslave-scripts.git', mode='incremental')) artefact = util.Property('artefact',default=0) testing_cmd = ["sh","triggers/testing_trigger.sh",artefact] testing_factory.addStep(ShellCommand(command=testing_cmd)) from buildbot.config import BuilderConfig c['builders'] = [] c['builders'].append( BuilderConfig(name="1. Integration", slavenames=["example-slave"], factory=firehose_factory)) c['builders'].append( BuilderConfig(name="2. Build", slavenames=["example-slave"], factory=builders_factory)) c['builders'].append( BuilderConfig(name="3. Deploy", slavenames=["example-slave"], factory=deploy_factory)) c['builders'].append( BuilderConfig(name="4. Test", slavenames=["example-slave"], factory=testing_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, auth authz_cfg=authz.Authz( # change any of these to True to enable; see the manual for more # options auth=auth.BasicAuth([("codething","password")]), gracefulShutdown = False, forceBuild = 'auth', # use this to test your slave once it is set up forceAllBuilds = False, pingBuilder = False, stopBuild = False, stopAllBuilds = False, cancelPendingBuild = False, ) c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg)) ####### 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'] = "CIAT" c['titleURL'] = "https://wiki.baserock.org" # 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'] = "http://0.0.0.0:8010/" ####### 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", }