Example #1
0
def deploy(version, venv_dir, profile):
    """ 发布指定的版本,会自动安装项目运行所需要的包

        version:build之后的版本
        venv_dir:虚拟环境名称
        profile:profile参数会传递到supervisord.conf中
    """

    if not version:
        version = build.get_latest_version()

    virtualenv.ensure(venv_dir)

    pre_hook = getattr(env, 'DEPLOY_PRE_HOOK', None)
    post_hook = getattr(env, 'DEPLOY_POST_HOOK', None)

    with virtualenv.activate(venv_dir):
        if callable(pre_hook):
            pre_hook(version, venv_dir, profile)
        supervisor.ensure(project=env.PROJECT, profile=profile)
        package.install(env.PROJECT, version)
        supervisor.shutdown()
        supervisor.start()
        if callable(post_hook):
            post_hook(version, venv_dir, profile)
Example #2
0
def deploy(version, venv_dir, profile):
    """ 发布指定的版本,会自动安装项目运行所需要的包

        version:build之后的版本
        venv_dir:虚拟环境名称
        profile:profile参数会传递到supervisord.conf中
    """

    if not version:
        version = build.get_latest_version()

    virtualenv.ensure(venv_dir)

    pre_hook = getattr(env, 'DEPLOY_PRE_HOOK', None)
    post_hook = getattr(env, 'DEPLOY_POST_HOOK', None)

    with virtualenv.activate(venv_dir):
        if callable(pre_hook):
            pre_hook(version, venv_dir, profile)
        supervisor.ensure(project=env.PROJECT, profile=profile)
        package.install(env.PROJECT, version)
        supervisor.shutdown()
        supervisor.start()
        if callable(post_hook):
            post_hook(version, venv_dir, profile)
Example #3
0
def git_deploy(venv_dir, profile):
    virtualenv.ensure(venv_dir)

    with virtualenv.activate(venv_dir):
        supervisor.ensure(project=env.PROJECT, profile=profile)
        package.install_from_git(env.PROJECT)
        supervisor.shutdown()
        supervisor.start()
Example #4
0
def git_deploy(venv_dir, profile):
    virtualenv.ensure(venv_dir)

    with virtualenv.activate(venv_dir):
        supervisor.ensure(project=env.PROJECT, profile=profile)
        package.install_from_git(env.PROJECT)
        supervisor.shutdown()
        supervisor.start()
Example #5
0
def deploy(version, venv_dir, profile):
    """
    发布指定的版本

    会自动安装项目运行所需要的包
    """

    virtualenv.ensure(venv_dir)

    with virtualenv.activate(venv_dir):
        supervisor.ensure(project=env.PROJECT, profile=profile)
        package.install(env.PROJECT, version)
        supervisor.shutdown()
        supervisor.start()
Example #6
0
def deploy(version, venv_dir, profile):
    """
    发布指定的版本

    会自动安装项目运行所需要的包
    """

    if not version:
        version = build.get_latest_version()

    virtualenv.ensure(venv_dir)

    with virtualenv.activate(venv_dir):
        supervisor.ensure(project=env.PROJECT, profile=profile)
        package.install(env.PROJECT, version)
        supervisor.shutdown()
        supervisor.start()