Example #1
0
def main():
    prefix = os.environ['DEPLOY_ROLLOUT_PREFIX']
    tag = os.environ['DEPLOY_ROLLOUT_TAG']
    force = os.environ['DEPLOY_FORCE']
    if force:
        force = "True"
    else:
        force = "False"

    log = raw_input("Log message: ")
    serv = redis.Redis(host='localhost', port=6379, db=0)
    serv.rpush(
        "deploy:log", "!log {0} started synchronizing {1} '{2}'".format(
            getpass.getuser(), tag, log))

    deploylib.update_repos(prefix, tag)
    deploylib.fetch(prefix)
    if not deploylib.ask(prefix, 'fetch'):
        return 1
    deploylib.checkout(prefix, force)
    if not deploylib.ask(prefix, 'checkout', force):
        return 1

    serv.rpush(
        "deploy:log",
        "!log {0} synchronized {1} '{2}'".format(getpass.getuser(), tag, log))
Example #2
0
def main():
    prefix = os.environ["DEPLOY_ROLLOUT_PREFIX"]
    tag = os.environ["DEPLOY_ROLLOUT_TAG"]
    force = os.environ["DEPLOY_FORCE"]
    # TODO: Use this message to notify IRC
    # msg = os.environ['DEPLOY_DEPLOY_TEXT']

    deploylib.update_repos(prefix, tag)
    # In general, for dependent repos, the parent repo is handling
    # fetch and checkout. Some dependent repos also update outside
    # of their parent repos. If the repo forces a sync, then we should
    # handle it.
    if force:
        deploylib.fetch(prefix)
        deploylib.checkout(prefix, "True")
def main():
    prefix = os.environ['DEPLOY_ROLLOUT_PREFIX']
    tag = os.environ['DEPLOY_ROLLOUT_TAG']
    force = os.environ['DEPLOY_FORCE']
    #TODO: Use this message to notify IRC
    #msg = os.environ['DEPLOY_DEPLOY_TEXT']

    deploylib.update_repos(prefix, tag)
    # In general, for dependent repos, the parent repo is handling
    # fetch and checkout. Some dependent repos also update outside
    # of their parent repos. If the repo forces a sync, then we should
    # handle it.
    if force:
        deploylib.fetch(prefix)
        deploylib.checkout(prefix, "True")
Example #4
0
def main():
    prefix = os.environ['DEPLOY_ROLLOUT_PREFIX']
    tag = os.environ['DEPLOY_ROLLOUT_TAG']
    force = os.environ['DEPLOY_FORCE']
    if force:
        force = "True"
    else:
        force = "False"

    log = raw_input("Log message: ")
    serv = redis.Redis(host='localhost', port=6379, db=0)
    serv.rpush("deploy:log", "!log {0} started synchronizing {1} '{2}'".format(getpass.getuser(), tag, log))

    deploylib.update_repos(prefix, tag)
    deploylib.fetch(prefix)
    if not deploylib.ask(prefix, 'fetch'):
        return 1
    deploylib.checkout(prefix, force)
    if not deploylib.ask(prefix, 'checkout', force):
        return 1

    serv.rpush("deploy:log", "!log {0} synchronized {1} '{2}'".format(getpass.getuser(), tag, log))