[Buildbot-commits] buildbot/buildbot/status/web builder.py, 1.18, 1.19
Brian Warner
warner at users.sourceforge.net
Thu May 22 22:12:07 UTC 2008
Update of /cvsroot/buildbot/buildbot/buildbot/status/web
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv16868/buildbot/status/web
Modified Files:
builder.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: builder.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/status/web/builder.py,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- builder.py 22 May 2008 22:11:25 -0000 1.18
+++ builder.py 22 May 2008 22:12:05 -0000 1.19
@@ -152,7 +152,18 @@
return data
- def force(self, req):
+ def force(self, req, custom_props={}):
+ """
+
+ Custom properties can be passed from the web form. To do
+ this, subclass this class, overriding the force() method. You
+ can then determine the properties (usually from form values,
+ by inspecting req.args), then pass them to this superclass
+ force method.
+
+ @param custom_props: Custom properties to set on build
+
+ """
name = req.args.get("username", ["<unknown>"])[0]
reason = req.args.get("comments", ["<no reason specified>"])[0]
branch = req.args.get("branch", [""])[0]
@@ -185,7 +196,7 @@
# button, use their name instead of None, so they'll be informed of
# the results.
s = SourceStamp(branch=branch, revision=revision)
- req = BuildRequest(r, s, self.builder_status.getName())
+ req = BuildRequest(r, s, custom_props, self.builder_status.getName())
try:
self.builder_control.requestBuildSoon(req)
except interfaces.NoSlaveError:
More information about the Commits
mailing list