示例#1
0
文件: cli.py 项目: kou/ursabot
def start_master(obj, no_daemon, start_timeout):
    """Start the buildmaster

    It is a wrapper around `buildbot start`.
    """
    from buildbot.scripts.start import start

    command_cfg = {
        'basedir': obj['config_path'].parent.absolute(),
        'quiet': False,
        'nodaemon': no_daemon,
        'start_timeout': start_timeout
    }
    start(command_cfg)  # loads the config through the buildbot.tac
示例#2
0
def restart(config):
    basedir = config['basedir']
    quiet = config['quiet']

    if not base.isBuildmasterDir(basedir):
        return 1

    if stop.stop(config, wait=True) != 0:
        return 1
    if not quiet:
        print("now restarting buildbot process..")
    return start.start(config)
示例#3
0
def restart(config):
    basedir = config['basedir']
    quiet = config['quiet']

    if not base.isBuildmasterDir(basedir):
        return 1

    if stop.stop(config, wait=True) != 0:
        return 1
    if not quiet:
        print("now restarting buildbot process..")
    return start.start(config)
示例#4
0
文件: restart.py 项目: verm/buildbot
def restart(config):
    basedir = config["basedir"]
    quiet = config["quiet"]

    if not base.isBuildmasterDir(basedir):
        print "not a buildmaster directory"
        return 1

    if stop.stop(config, wait=True) != 0:
        return 1
    if not quiet:
        print "now restarting buildbot process.."
    return start.start(config)
示例#5
0
def start_master(obj, no_daemon, start_timeout):
    """Start the buildmaster

    It is a wrapper around `buildbot start`.
    """
    from buildbot.scripts.start import start

    command_cfg = {
        'basedir': obj['config_path'].parent.absolute(),
        'quiet': False,
        'nodaemon': no_daemon,
        'start_timeout': start_timeout
    }
    result = start(command_cfg)  # loads the config through the buildbot.tac
    if result > 0:
        raise click.Abort('Failed to start the Buildbot master!')

    url = obj['config'].url
    click.echo('Buildbot UI is available at: ' + click.style(url, fg='green'))
 def test_start_not_basedir(self):
     self.assertEqual(start.start(mkconfig(basedir='doesntexist')), 1)
     self.assertInStdout('invalid buildmaster directory')
示例#7
0
 def test_start_not_basedir(self):
     self.assertEqual(start.start(mkconfig(basedir='doesntexist')), 1)
     self.assertInStdout('invalid buildmaster directory')