Exemplo n.º 1
0
def deploy_demo(branch=None):
    """
    Runs the demo task for the specified branch
    """
    result_key = str(int(time.time()))
    # don't deploy these branches
    ignored_branches = ['dev', 'staging', 'production']
    # hack to check to make sure a demo of that branch exists
    hook_key = 'github'
    ops.run_fabric_task('demo:amara show_demos',
        result_key=hook_key, notify=False)
    demos = ops.get_fabric_log(hook_key)
    demo_name = branch.replace('-', '_')
    if branch not in ignored_branches and demos.find(demo_name) != -1:
        task = 'demo:amara,{0} deploy'.format(branch)
        job = queue_task(ops.run_fabric_task, task, result_key)
Exemplo n.º 2
0
def deploy_demo(branch=None):
    """
    Runs the demo task for the specified branch
    """
    result_key = str(int(time.time()))
    # don't deploy these branches
    ignored_branches = ['dev', 'staging', 'production']
    # hack to check to make sure a demo of that branch exists
    hook_key = 'github'
    ops.run_fabric_task('demo:amara show_demos',
                        result_key=hook_key,
                        notify=False)
    demos = ops.get_fabric_log(hook_key)
    demo_name = branch.replace('-', '_')
    if branch not in ignored_branches and demos.find(demo_name) != -1:
        task = 'demo:amara,{0} deploy'.format(branch)
        job = queue_task(ops.run_fabric_task, task, result_key)
Exemplo n.º 3
0
def get_log(key=None):
    return _convert_ansi(ops.get_fabric_log(key))
Exemplo n.º 4
0
def get_log(key=None):
    return _convert_ansi(ops.get_fabric_log(key))