[Buildbot-devel] Triggering a build on all idle red builders?
dank at kegel.com
Wed Feb 6 05:48:13 UTC 2013
It might be handy to have a button on the builder list page
that forced a build on all idle red builders.
(The use case is "a whole bunch of interdependent
builders with no build coordination, and a user bringing
up a new bot. Pressing the button once will build everything,
but only the builders with no dependencies will succeed.
After that, pressing the button a second time will build
just the things with one or more dependencies, and
only the builders who depend just on the things that built
the first time will succeed. etc. A lot easier than trying
to figure out which builder to trigger next by hand.)
Looking at the IRC interface in buildbot/status/words.py, it
seems like it ought to be easy to hack this together, e.g.
def command_FORCERED(self, args, who):
builders = self.getAllBuilders()
for b in builders:
state = b.getState()
if state == 'idle':
last = b.getLastFinishedBuild()
res = last.getResults()
if res == FAILURE:
bc = self.getControl(b)
reason = "forced: by %s: %s" %
ss = SourceStamp()
I haven't looked at buildbot/status/web/builder.py yet, but presumably
that's not much more complicated than the irc interface.
Has anybody done anything like this already?
More information about the devel