def update_hostnames(zoomdb, app_id, zoombuild_cfg_content, use_subtasks=True): zcfg = utils.parse_zoombuild_string(zoombuild_cfg_content) site_media_map = utils.parse_site_media_map(zcfg.get("site_media_map", "")) opts = {"APP_ID": app_id, "SITE_MEDIA_MAP": site_media_map, "USE_SUBTASKS": use_subtasks} utils.run_steps(zoomdb, opts, ( find_deployments, update_proxy_configuration, ))
def check_repo(zoomdb, app_id, src_repo_type, src_url): opts = {"CO_DIR": os.path.join(taskconfig.NR_CUSTOMER_DIR, app_id, "src"), "SRC_REPO_TYPE": src_repo_type, "SRC_URL": src_url, "APP_ID": app_id, } utils.run_steps(zoomdb, opts, ( checkout_code, inspect_code_settings))
def build_and_deploy(zoomdb, app_id, src_repo_type, src_url, zoombuild_cfg_content, use_subtasks=True, bundle_storage_engine=None, post_build_hooks=None, post_deploy_hooks=None, num_workers=1, requires_postgis=False, ): app_dir = os.path.join(taskconfig.NR_CUSTOMER_DIR, app_id) bundle_storage_engine = bundle.get_bundle_storage_engine( bundle_storage_engine) opts = { "APP_ID": app_id, "APP_DIR": app_dir, "CO_DIR": os.path.join(app_dir, "src"), "SRC_REPO_TYPE": src_repo_type, "SRC_URL": src_url, "ZOOMBUILD_CFG_CONTENT": zoombuild_cfg_content, "USE_SUBTASKS": use_subtasks, "BUNDLE_STORAGE": bundle_storage_engine, "POST_BUILD_HOOKS": post_build_hooks, "POST_DEPLOY_HOOKS": post_deploy_hooks, "NUM_WORKERS": num_workers, "REQUIRES_POSTGIS": requires_postgis, } utils.run_steps(zoomdb, opts, ( common_steps.checkout_code, write_build_configuration, build_project_bundle, request_database_setup, upload_project_bundle, wait_for_database_setup_to_complete, select_app_server_for_deployment, deploy_project_to_appserver, run_post_deploy_hooks, update_front_end_proxy, remove_previous_versions, )) return opts["DEPLOYED_ADDRESSES"]