OLD | NEW |
(Empty) | |
| 1 # -*- python -*- |
| 2 # ex: set syntax=python: |
| 3 <% require 'json' -%> |
| 4 |
| 5 # This is a sample buildmaster config file. It must be installed as |
| 6 # 'master.cfg' in your buildmaster's base directory. |
| 7 |
| 8 import buildbot.buildslave |
| 9 import buildbot.status.html |
| 10 import buildbot.status.web.authz |
| 11 |
| 12 # This is the dictionary that the buildmaster pays attention to. |
| 13 # We also use a shorter alias to save typing. |
| 14 c = BuildmasterConfig = {} |
| 15 |
| 16 ####### BUILDSLAVES |
| 17 |
| 18 # The 'slaves' list defines the set of recognized buildslaves. Each |
| 19 # element is a BuildSlave object, specifying a unique slave name and |
| 20 # password. The same slave name and password must be configured on |
| 21 # the slave. |
| 22 |
| 23 c['slaves'] = [ |
| 24 # Puppet: $slaves where $master == localhost:9989 |
| 25 <% @slaves.sort.each do |name, record| -%> |
| 26 <% default_master = "127.0.0.1:#{@port}" -%> |
| 27 <% master = record.fetch('master', default_master) -%> |
| 28 <% if [default_master, "localhost:#{@port}"].include? master -%> |
| 29 buildbot.buildslave.BuildSlave(<%= |
| 30 name.to_s.to_json %>, <%= |
| 31 record.fetch('password', 'changeme').to_s.to_json %>), |
| 32 <% end -%> |
| 33 <% end -%> |
| 34 # Puppet: $slots |
| 35 <% @slots.sort.each do |name,password| -%> |
| 36 buildbot.buildslave.BuildSlave(<%= |
| 37 name.to_s.to_json %>, <%= |
| 38 password.to_s.to_json %>), |
| 39 <% end -%> |
| 40 ] |
| 41 |
| 42 # 'slavePortnum' defines the TCP port to listen on for connections |
| 43 # from slaves. This must match the value configured into the buildslaves |
| 44 # (with their --master option) |
| 45 |
| 46 c['slavePortnum'] = <%= @port.to_i %> |
| 47 |
| 48 ####### CHANGESOURCES |
| 49 |
| 50 # the 'change_source' setting tells the buildmaster how it should |
| 51 # find out about source code changes. |
| 52 |
| 53 c['change_source'] = [] |
| 54 |
| 55 # c['change_source'].append(buidlbot.changes.gitpoller.GitPoller( |
| 56 # 'git://github.com/buildbot/pyflakes.git', |
| 57 # workdir='gitpoller-workdir', branch='master', pollinterval=300) |
| 58 |
| 59 ####### SCHEDULERS |
| 60 |
| 61 # Configure the Schedulers, decidng how to react to incoming changes. |
| 62 |
| 63 c['schedulers'] = [] |
| 64 |
| 65 # c['schedulers'].append(buildbot.schedulers.basic.SingleBranchScheduler( |
| 66 # name="all", treeStableTimer=None, builderNames=["runtests"], |
| 67 # change_filter=builtbot.changes.filter.ChangeFilter(branch='master'))) |
| 68 |
| 69 ####### BUILDERS |
| 70 |
| 71 # The 'builders' list defines the Builders, which tell Buildbot how |
| 72 # to perform a build: what steps, and which slaves can execute them. |
| 73 # Note that any particular build will only take place on one slave. |
| 74 |
| 75 c['builders'] = [] |
| 76 |
| 77 # factory = buildbot.process.factory.BuildFactory() |
| 78 # factory.addStep(buildbot.steps.source.Git( |
| 79 # repourl='git://github.com/buildbot/pyflakes.git', mode='copy')) |
| 80 # factory.addStep(buildbot.steps.shell.ShellCommand( |
| 81 # command=["trial", "pyflakes"])) |
| 82 |
| 83 # c['builders'].append(buildbot.config.BuilderConfig( |
| 84 # name="runtests", slavenames=["example-slave"], factory=factory)) |
| 85 |
| 86 ####### STATUS TARGETS |
| 87 |
| 88 # 'status' is a list of Status Targets. The results of each build will |
| 89 # be pushed to these targets. buildbot/status/*.py has a variety to |
| 90 # choose from, including web pages, email senders, and IRC bots. |
| 91 |
| 92 c['status'] = [] |
| 93 c['status'].append( |
| 94 buildbot.status.html.WebStatus( |
| 95 http_port=<%= @http_port.to_i %>, |
| 96 authz=buildbot.status.web.authz.Authz( |
| 97 gracefulShutdown = False, |
| 98 forceBuild = True, |
| 99 forceAllBuilds = False, |
| 100 pingBuilder = False, |
| 101 stopBuild = False, |
| 102 stopAllBuilds = False, |
| 103 cancelPendingBuild = False, |
| 104 ), |
| 105 ), |
| 106 ) |
| 107 |
| 108 ####### PROJECT IDENTITY |
| 109 |
| 110 # the 'title' string will appear at the top of this buildbot |
| 111 # installation's html.WebStatus home page (linked to the 'titleURL') |
| 112 # and is embedded in the title of the waterfall HTML page. |
| 113 |
| 114 c['title'] = <%= @project.fetch('title', 'Example').to_s.to_json %> |
| 115 c['titleURL'] = <%= @project.fetch('url', 'http://example.com/').to_s.to_json %> |
| 116 |
| 117 # the 'buildbotURL' string points to the location where the buildbot's |
| 118 # internal web server (usually the html.WebStatus page) is visible. This |
| 119 # typically uses the port number set in the Waterfall 'status' entry, |
| 120 # but with an externally-visible host name which the buildbot cannot |
| 121 # figure out without some help. |
| 122 |
| 123 c['buildbotURL'] = 'http://localhost:<%= @http_port.to_i %>/' |
| 124 |
| 125 ####### DB URL |
| 126 |
| 127 # This specifies what database buildbot uses to store change and |
| 128 # scheduler state. Leave this at its default for all but maybe the |
| 129 # largest installations. |
| 130 |
| 131 c['db_url'] = <%= @database.to_s.to_json %> |
| 132 |
OLD | NEW |