Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: modules/buildbot/templates/master.cfg.erb

Issue 29325436: Issue 1281 - Introduce module buildbot (Closed)
Patch Set: Issue 1281 - Rebase branch buildbot on top of upstream Created Sept. 5, 2015, 11:27 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..8bf4f134f296f0985e211ad20d6ed9f64815cc52
--- /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 = {}
+
+####### 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: $slots
+<% @slots.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'] = <%= @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['title'] = <%= @project.fetch('title', 'Example').to_s.to_json %>
+c['titleURL'] = <%= @project.fetch('url', 'http://example.com/').to_s.to_json %>
+
+# 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['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 %>
+

Powered by Google App Engine
This is Rietveld