Add OpenSRF rel_1_6 and rel_2_0 builds to the OpenSRF build slave
authordbs <dbs@9efc2488-bf62-4759-914b-345cdb29e865>
Fri, 28 Jan 2011 16:15:11 +0000 (16:15 +0000)
committerdbs <dbs@9efc2488-bf62-4759-914b-345cdb29e865>
Fri, 28 Jan 2011 16:15:11 +0000 (16:15 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2155 9efc2488-bf62-4759-914b-345cdb29e865

examples/buildbot.cfg

index 10f92dd..83a8748 100644 (file)
@@ -14,7 +14,7 @@ c = BuildmasterConfig = {}
 # 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")]
+c['slaves'] = [BuildSlave("XXX", "XXX", max_builds=1)]
 
 # 'slavePortnum' defines the TCP port to listen on for connections from slaves.
 # This must match the value configured into the buildslaves (with their
@@ -24,14 +24,21 @@ 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:
+# about source code changes.  Here we point to OpenSRF:
 
-from buildbot.changes.svnpoller import SVNPoller
-c['change_source'] = SVNPoller(
+from buildbot.changes import svnpoller
+c['change_source'] = svnpoller.SVNPoller(
        project='OpenSRF trunk',
-        svnurl='svn://svn.open-ils.org/OpenSRF/trunk',
+        svnurl='svn://svn.open-ils.org/OpenSRF',
+        split_file=svnpoller.split_file_branches,
         pollinterval=600)
 
+####### FILTERS
+from buildbot.schedulers.filter import ChangeFilter
+trunk_filter = ChangeFilter(branch="trunk")
+rel_1_6_filter = ChangeFilter(branch="branches/rel_1_6")
+rel_2_0_filter = ChangeFilter(branch="branches/rel_2_0")
+
 ####### SCHEDULERS
 
 # Configure the Schedulers, which decide how to react to incoming changes.  In this
@@ -39,9 +46,20 @@ c['change_source'] = SVNPoller(
 
 from buildbot.scheduler import Scheduler
 c['schedulers'] = []
-c['schedulers'].append(Scheduler(name="all", branch=None,
-                                 treeStableTimer=None,
-                                 builderNames=["osrf-trunk-ubuntu-10.04-x86_64"]))
+c['schedulers'].append(Scheduler(name="osrf-trunk-full",
+            treeStableTimer=300,
+            change_filter=trunk_filter,
+            builderNames=["osrf-trunk-ubuntu-10.04-x86_64"]))
+
+c['schedulers'].append(Scheduler(name="osrf-rel_1_6",
+            treeStableTimer=300,
+            change_filter=rel_1_6_filter,
+            builderNames=["osrf-rel_1_6-ubuntu-10.04-x86_64"]))
+
+c['schedulers'].append(Scheduler(name="osrf-rel_2_0",
+            treeStableTimer=300,
+            change_filter=rel_2_0_filter,
+            builderNames=["osrf-rel_2_0-ubuntu-10.04-x86_64"]))
 
 ####### BUILDERS
 
@@ -58,9 +76,8 @@ 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'))
+            baseURL='svn://svn.open-ils.org/OpenSRF/%%BRANCH%%',
+            mode='copy'))
 
 # bootstrap the code
 factory.addStep(shell.ShellCommand(command=["./autogen.sh"]))
@@ -74,8 +91,12 @@ factory.addStep(shell.Compile(command=["make"]))
 # run the Perl unit tests
 factory.addStep(shell.PerlModuleTest(workdir="build/src/perl"))
 
-# run the Python unit tests
+# run the Python unit tests (available after rel_1_6)
+def has_python_unit_test(step):
+    return step.build.getProperty('branch') != 'branches/rel_1_6'
+
 factory.addStep(python_twisted.Trial(
+    doStepIf=has_python_unit_test,
        testpath="build",
        tests="src/python/tests/json_test.py"))
 
@@ -112,6 +133,14 @@ c['builders'].append(
     BuilderConfig(name="osrf-trunk-ubuntu-10.04-x86_64",
       slavenames=["opensrf-slave"],
       factory=factory))
+c['builders'].append(
+    BuilderConfig(name="osrf-rel_1_6-ubuntu-10.04-x86_64",
+      slavenames=["opensrf-slave"],
+      factory=factory))
+c['builders'].append(
+    BuilderConfig(name="osrf-rel_2_0-ubuntu-10.04-x86_64",
+      slavenames=["opensrf-slave"],
+      factory=factory))
 
 ####### STATUS TARGETS