[Buildbot-commits] buildbot/buildbot scheduler.py,1.26,1.27

Brian Warner warner at users.sourceforge.net
Thu Mar 20 17:43:11 UTC 2008


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

Modified Files:
	scheduler.py 
Log Message:
[project @ #56:trigger.patch]
Schedulers that can be triggered by buildsteps, allowing more
fine-grained control than Dependent schedulers.

Original author: dustin at v.igoro.us
Date: 2008-02-17 04:49:06+00:00

Index: scheduler.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/scheduler.py,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- scheduler.py	6 Feb 2007 20:36:09 -0000	1.26
+++ scheduler.py	20 Mar 2008 17:43:08 -0000	1.27
@@ -682,3 +682,28 @@
         from buildbot.status.client import makeRemote
         return makeRemote(bs.status)
 
+class Triggerable(BaseUpstreamScheduler):
+    """
+    This scheduler doesn't do anything until it is triggered by
+    a Trigger step in a factory.
+    """
+
+    def __init__(self, name, builderNames):
+        BaseUpstreamScheduler.__init__(self, name)
+        self.builderNames = builderNames
+
+    def listBuilderNames(self):
+        return self.builderNames
+
+    def getPendingBuildTimes(self):
+        return []
+
+    def trigger(self, ss):
+        """
+        Trigger this scheduler.  Returns a deferred that will fire when the buildset
+        is finished.
+        """
+        bs = buildset.BuildSet(self.builderNames, ss)
+        d = bs.waitUntilFinished()
+        self.submit(bs)
+        return d





More information about the Commits mailing list