Index: modules/buildbot/templates/master.cfg.erb |
diff --git a/modules/buildbot/templates/master.cfg.erb b/modules/buildbot/templates/master.cfg.erb |
new file mode 100644 |
index 0000000000000000000000000000000000000000..31a952331e06ef77b6f7ec177604a01ec932eba4 |
--- /dev/null |
+++ b/modules/buildbot/templates/master.cfg.erb |
@@ -0,0 +1,132 @@ |
+# -*- python -*- |
+# ex: set syntax=python: |
+<% require 'json' -%> |
+ |
+# This is a sample buildmaster config file. It must be installed as |
+# 'master.cfg' in your buildmaster's base directory. |
+ |
+import buildbot.buildslave |
+import buildbot.status.html |
+import buildbot.status.web.authz |
+ |
+# This is the dictionary that the buildmaster pays attention to. |
+# We also use a shorter alias to save typing. |
+c = BuildmasterConfig = <%= @config.to_json %> |
+ |
+####### 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. |
+ |
+c['slaves'] = [ |
+ # Puppet: $slaves where $master == localhost:9989 |
+<% @slaves.sort.each do |name, record| -%> |
+<% default_master = "127.0.0.1:#{@port}" -%> |
+<% master = record.fetch('master', default_master) -%> |
+<% if [default_master, "localhost:#{@port}"].include? master -%> |
+ buildbot.buildslave.BuildSlave(<%= |
+ name.to_s.to_json %>, <%= |
+ record.fetch('password', 'changeme').to_s.to_json %>), |
+<% end -%> |
+<% end -%> |
+ # Puppet: $slave_credentials |
+<% @slave_credentials.sort.each do |name,password| -%> |
+ buildbot.buildslave.BuildSlave(<%= |
+ name.to_s.to_json %>, <%= |
+ password.to_s.to_json %>), |
+<% end -%> |
+] |
+ |
+# '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'] = <%= @slave_port.to_i %> |
+ |
+####### CHANGESOURCES |
+ |
+# the 'change_source' setting tells the buildmaster how it should |
+# find out about source code changes. |
+ |
+c['change_source'] = [] |
+ |
+# c['change_source'].append(buidlbot.changes.gitpoller.GitPoller( |
+# 'git://github.com/buildbot/pyflakes.git', |
+# workdir='gitpoller-workdir', branch='master', pollinterval=300) |
+ |
+####### SCHEDULERS |
+ |
+# Configure the Schedulers, decidng how to react to incoming changes. |
+ |
+c['schedulers'] = [] |
+ |
+# c['schedulers'].append(buildbot.schedulers.basic.SingleBranchScheduler( |
+# name="all", treeStableTimer=None, builderNames=["runtests"], |
+# change_filter=builtbot.changes.filter.ChangeFilter(branch='master'))) |
+ |
+####### 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. |
+ |
+c['builders'] = [] |
+ |
+# factory = buildbot.process.factory.BuildFactory() |
+# factory.addStep(buildbot.steps.source.Git( |
+# repourl='git://github.com/buildbot/pyflakes.git', mode='copy')) |
+# factory.addStep(buildbot.steps.shell.ShellCommand( |
+# command=["trial", "pyflakes"])) |
+ |
+# c['builders'].append(buildbot.config.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'] = [] |
+c['status'].append( |
+ buildbot.status.html.WebStatus( |
+ http_port=<%= @http_port.to_i %>, |
+ authz=buildbot.status.web.authz.Authz( |
+ gracefulShutdown = False, |
+ forceBuild = True, |
+ forceAllBuilds = False, |
+ pingBuilder = False, |
+ stopBuild = False, |
+ stopAllBuilds = False, |
+ cancelPendingBuild = False, |
+ ), |
+ ), |
+) |
+ |
+####### 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.setdefault('title', 'Example') |
+c.setdefault('titleURL', 'http://example.com/') |
Felix Dahlke
2016/02/10 09:26:10
I suppose I'm missing something, but where are set
mathias
2016/02/10 10:30:45
Above, line 14; c = BuildmasterConfig = <%= @confi
Felix Dahlke
2016/02/10 11:54:40
Acknowledged.
|
+ |
+# the 'buildbotURL' string points 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.setdefault('buildbotURL', 'http://localhost:<%= @http_port.to_i %>/') |
+ |
+####### DB URL |
+ |
+# This specifies what database buildbot uses to store change and |
+# scheduler state. Leave this at its default for all but maybe the |
+# largest installations. |
+ |
+c['db_url'] = <%= @database.to_s.to_json %> |
+ |