[Buildbot-devel] getting buildslaves to exit after one build?
Dan Kegel
dank at kegel.com
Sat Aug 25 02:16:40 UTC 2012
More completely:
diff --git a/master/buildbot/process/build.py b/master/buildbot/process/build.py
index 3477444..9af4f67 100644
--- a/master/buildbot/process/build.py
+++ b/master/buildbot/process/build.py
@@ -246,6 +246,9 @@ class Build(properties.PropertiesMixin):
def _release_slave(res, slave, bs):
self.slavebuilder.buildFinished()
slave.updateSlaveStatus(buildFinished=bs)
+ if (slave.properties.getProperty('oneshot', False)):
+ log.msg("Shutting down oneshot slave!")
+ slave.shutdown()
return res
d.addCallback(_release_slave, self.slavebuilder.slave, build_status)
Tested with a minor mod to the tutorial master.cfg:
props = { 'oneshot' : True }
c['slaves'] = [BuildSlave("example-slave", "pass", properties = props)]
OK then, I'm off to go pull the rest of my lxc configuration together with
duct tape and bailing wire :-)
- Dan
More information about the devel
mailing list