view autobot/template/restart_buildbot.py @ 187:bba97450cbc2

* update example and templates * more documentation
author Jeff Hammel <jhammel@mozilla.com>
date Tue, 01 Feb 2011 21:17:00 -0800
parents 42b82c5bb03d
children 2cda5a640ae7
line wrap: on
line source

#!/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])))

debug = {{debug}}
if debug:
    call(['rm', '-f', 'master/twistd.log'])
    call(['rm', '-f', 'slave/twistd.log'])
    call(['rm', '-rf', 'slave/full'])
call(['buildbot', 'stop', 'master'])
call(['buildslave', 'stop', 'slave'])
call(['buildbot', 'start', 'master'])
call(['buildslave', 'start', 'slave'])

# could force a build here
# buildbot sendchange ...