def deploy_sample(app_name, version="1"): """Deploy the sample app to test_integration/filesys/deployed/app_name/.""" orig_deploy_ve_fun = patch_deploy_venv() args = { 'app': app_name, 'target': 'master', 'config': deployconf_fn, 'version': version, 'deploy_settings': deployconf.deploy_settings } deploy(**args) patch_deploy_venv(orig_deploy_ve_fun)
def deploy_app(app): if app not in available_applications(current_app.config): abort(404) if request.method == 'POST': log.debug('Request to deploy %s', app) if request.form: log.debug('Extra arguments: %s', request.form) target = request.form.get('target', 'master') version = request.form.get('version') deploy(app, target, current_app.config.deploy_config_fn, version, current_app.config) log.info('Version %s of %s successfully deployed', version, app) application = Application(app, current_app.config.deploy_config_fn) version = application.live_version return jsonify({'application': {'name': app, 'version': version}})
def do_deploy(opts): "Deploy an application" deploy(opts.app, opts.target, opts.config, opts.version, opts.deploy_settings)