phase1: prioritize tagged build requests
authorJo-Philipp Wich <jo@mein.io>
Mon, 6 Feb 2017 12:41:47 +0000 (13:41 +0100)
committerJo-Philipp Wich <jo@mein.io>
Mon, 6 Feb 2017 12:41:47 +0000 (13:41 +0100)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
phase1/master.cfg

index a8d6737682c9a7839dddd0836b32fd7226fa8f05..735d2d456c703eb21e7b271fbb040dd50b18b6a6 100644 (file)
@@ -246,6 +246,12 @@ def GetCwd(props):
        else:
                return "/"
 
+def GetNextBuild(builder, requests):
+       for r in requests:
+               if r.properties and r.properties.hasProperty("tag"):
+                       return r
+       return requests[0]
+
 def MakeEnv(overrides=None):
        env = {
                'CC': WithProperties("%(cc)s", cc=GetCC),
@@ -756,7 +762,7 @@ for target in targets:
 
        from buildbot.config import BuilderConfig
 
-       c['builders'].append(BuilderConfig(name=target, slavenames=slaveNames, factory=factory))
+       c['builders'].append(BuilderConfig(name=target, slavenames=slaveNames, factory=factory, nextBuild=getNextBuild))
 
 
 ####### STATUS TARGETS