[Opensrf-commits] r2155 - trunk/examples (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Jan 28 11:15:14 EST 2011


Author: dbs
Date: 2011-01-28 11:15:11 -0500 (Fri, 28 Jan 2011)
New Revision: 2155

Modified:
   trunk/examples/buildbot.cfg
Log:
Add OpenSRF rel_1_6 and rel_2_0 builds to the OpenSRF build slave


Modified: trunk/examples/buildbot.cfg
===================================================================
--- trunk/examples/buildbot.cfg	2011-01-27 05:19:06 UTC (rev 2154)
+++ trunk/examples/buildbot.cfg	2011-01-28 16:15:11 UTC (rev 2155)
@@ -14,7 +14,7 @@
 # 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 @@
 ####### 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,10 +46,21 @@
 
 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
 
 # The 'builders' list defines the Builders, which tell Buildbot how to perform a build:
@@ -58,9 +76,8 @@
 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 @@
 # 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 @@
     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
 



More information about the opensrf-commits mailing list