[Buildbot-commits] buildbot/buildbot/scripts runner.py, 1.60, 1.61 tryclient.py, 1.20, 1.21

Brian Warner warner at users.sourceforge.net
Thu May 22 22:12:07 UTC 2008


Update of /cvsroot/buildbot/buildbot/buildbot/scripts
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv16868/buildbot/scripts

Modified Files:
	runner.py tryclient.py 
Log Message:
[project @ #87:customprops.patch]
Patch by Paul Gain, Roch Gadson <rochester.gadsdon at bakbone.com>, and
Aaron Maxwell <amax at snaplogic.org> to implement "custom properties":
build properties that can be specified when the build is initially
created, e.g., by a scheduler.

Original author: dustin at v.igoro.us
Date: 2008-04-04 03:52:33+00:00

Index: runner.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/scripts/runner.py,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -d -r1.60 -r1.61
--- runner.py	28 Mar 2008 05:55:46 -0000	1.60
+++ runner.py	22 May 2008 22:12:05 -0000	1.61
@@ -763,6 +763,8 @@
 
         ["builder", "b", None,
          "Run the trial build on this Builder. Can be used multiple times."],
+        ["customproperties", None, None,
+         "A set of custom properties made available in the build environment, format:prop=value,propb=valueb..."],
         ]
 
     optFlags = [
@@ -772,10 +774,22 @@
     def __init__(self):
         super(TryOptions, self).__init__()
         self['builders'] = []
+        self['custom_props'] = {}
 
     def opt_builder(self, option):
         self['builders'].append(option)
 
+    def opt_customproperties(self, option):
+        # We need to split the value of this option into a dictionary of custom
+        # properties
+        custom_props = {}
+        propertylist = option.split(",")
+        for i in range(0,len(propertylist)):
+            print propertylist[i]
+            splitproperty = propertylist[i].split("=")
+            custom_props[splitproperty[0]] = splitproperty[1]
+        self['custom_props'] = custom_props
+
     def opt_patchlevel(self, option):
         self['patchlevel'] = int(option)
 

Index: tryclient.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/scripts/tryclient.py,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- tryclient.py	22 Nov 2007 01:04:34 -0000	1.20
+++ tryclient.py	22 May 2008 22:12:05 -0000	1.21
@@ -442,9 +442,13 @@
 
     def _deliverJob_pb(self, remote):
         ss = self.sourcestamp
+
         d = remote.callRemote("try",
-                              ss.branch, ss.revision, ss.patch,
-                              self.builderNames)
+                              ss.branch,
+                              ss.revision,
+                              ss.patch,
+                              self.builderNames,
+                              self.config.get('custom_props', {}))
         d.addCallback(self._deliverJob_pb2)
         return d
     def _deliverJob_pb2(self, status):





More information about the Commits mailing list