Check in a sample buildbot configuration file for OpenSRF
authordbs <dbs@9efc2488-bf62-4759-914b-345cdb29e865>
Wed, 26 Jan 2011 19:55:29 +0000 (19:55 +0000)
committerdbs <dbs@9efc2488-bf62-4759-914b-345cdb29e865>
Wed, 26 Jan 2011 19:55:29 +0000 (19:55 +0000)
Change XXX to meaningful values before deploying :)

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2152 9efc2488-bf62-4759-914b-345cdb29e865

examples/buildbot.cfg [new file with mode: 0644]

diff --git a/examples/buildbot.cfg b/examples/buildbot.cfg
new file mode 100644 (file)
index 0000000..c31cfa4
--- /dev/null
@@ -0,0 +1,166 @@
+# -*- 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 username and password.  The same username and
+# password must be configured on the slave.
+from buildbot.buildslave import BuildSlave
+c['slaves'] = [BuildSlave("XXX", "XXX")]
+
+# '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'] = XXX
+
+####### CHANGESOURCES
+
+# the 'change_source' setting tells the buildmaster how it should find out
+# about source code changes.  Here we point to OpenSRF trunk:
+
+from buildbot.changes.svnpoller import SVNPoller
+c['change_source'] = SVNPoller(
+       project='OpenSRF trunk',
+        svnurl='svn://svn.open-ils.org/OpenSRF/trunk',
+        pollinterval=600)
+
+####### SCHEDULERS
+
+# Configure the Schedulers, which decide how to react to incoming changes.  In this
+# case, just kick off a 'runtests' build
+
+from buildbot.scheduler import Scheduler
+c['schedulers'] = []
+c['schedulers'].append(Scheduler(name="all", branch=None,
+                                 treeStableTimer=None,
+                                 builderNames=["maker"]))
+
+####### 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 import source 
+from buildbot.steps import shell
+from buildbot.steps import python
+from buildbot.steps import python_twisted
+
+factory = BuildFactory()
+# check out the source
+factory.addStep(source.SVN(
+       baseURL='svn://svn.open-ils.org/OpenSRF/',
+       defaultBranch='trunk',
+       mode='copy'))
+
+# bootstrap the code
+factory.addStep(shell.ShellCommand(command=["./autogen.sh"]))
+
+# configure (default args for now)
+factory.addStep(shell.Configure())
+
+# compile the code
+factory.addStep(shell.Compile(command=["make"]))
+
+# run the Perl unit tests
+factory.addStep(shell.PerlModuleTest(workdir="build/src/perl"))
+
+# run the Python unit tests
+factory.addStep(python_twisted.Trial(
+       testpath="build",
+       tests="src/python/tests/json_test.py"))
+
+# report on the Python code
+factory.addStep(python.PyLint(
+       env={"PYTHONPATH": ["src/python"]},
+       flunkOnFailure=False,
+       command=["pylint", 
+               "--output-format=parseable",
+               "src/python/opensrf.py",
+               "src/python/osrf/app.py",
+               "src/python/osrf/cache.py",
+               "src/python/osrf/conf.py",
+               "src/python/osrf/const.py",
+               "src/python/osrf/ex.py",
+               "src/python/osrf/gateway.py",
+               "src/python/osrf/http_translator.py",
+               "src/python/osrf/json.py",
+               "src/python/osrf/log.py",
+               "src/python/osrf/net_obj.py",
+               "src/python/osrf/net.py",
+               "src/python/osrf/server.py",
+               "src/python/osrf/ses.py",
+               "src/python/osrf/set.py",
+               "src/python/osrf/stack.py",
+               "src/python/osrf/system.py",
+               "src/python/osrf/xml_obj.py",
+               "src/python/osrf/apps/example.py"]))
+
+from buildbot.config import BuilderConfig
+
+c['builders'] = []
+c['builders'].append(
+    BuilderConfig(name="maker",
+      slavenames=["opensrf-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 auth, authz
+
+users = [('XXX', 'XXX'), ('XXX', 'XXX')]
+authz_cfg=authz.Authz(
+    auth=auth.BasicAuth(users),
+    # change any of these to True to enable; see the manual for more
+    # options
+    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 'projectName' string will be used to describe the project that this
+# buildbot is working on. For example, it is used as the title of the
+# waterfall HTML page. The 'projectURL' string will be used to provide a link
+# from buildbot HTML pages to your project's home page.
+
+c['projectName'] = "OpenSRF trunk"
+c['projectURL'] = "http://evergreen-ils.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://localhost:8010/"
+
+####### DB URL
+
+# This specifies what database buildbot uses to store change and scheduler
+# state.  You can leave this at its default for all but the largest
+# installations.
+c['db_url'] = "sqlite:///state.sqlite"
+