changeset 36:d91d3dfadb6b

stub for restarting the bot
author Jeff Hammel <jhammel@mozilla.com>
date Sat, 08 Jan 2011 11:03:51 -0800
parents 9866e68887c8
children b41f50162908
files autobot/template/restart_buildbot.py
diffstat 1 files changed, 20 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/autobot/template/restart_buildbot.py	Sat Jan 08 11:03:51 2011 -0800
@@ -0,0 +1,20 @@
+#!/usr/bin/env python
+
+"""(re)start the buildbot"""
+
+import os
+import sys
+from subprocess import call
+from time import sleep
+
+os.chdir(os.path.abspath(os.path.dirname(sys.argv[0])))
+
+if {{debug}}:
+    call(['rm', '-f', 'master/twistd.log'])
+    call(['rm', '-f', 'slave/twistd.log'])
+call(['buildbot', 'stop', 'master'])
+call(['buildslave', 'stop', 'slave'])
+call(['buildbot', 'start', 'master'])
+call(['buildslave', 'start', 'slave'])
+#sleep(5)
+#call(['bash', '${slave}/force-build.sh'] + sys.argv[1:])