diff options
Diffstat (limited to 'apex')
-rw-r--r-- | apex/build/build_utils.py | 7 | ||||
-rw-r--r-- | apex/deploy.py | 13 |
2 files changed, 11 insertions, 9 deletions
diff --git a/apex/build/build_utils.py b/apex/build/build_utils.py index 14327a90..66a63d37 100644 --- a/apex/build/build_utils.py +++ b/apex/build/build_utils.py @@ -16,6 +16,8 @@ import re import shutil import sys +from urllib.parse import quote_plus + def clone_fork(args): ref = None @@ -35,7 +37,9 @@ def clone_fork(args): change_id = m.group(1) logging.info("Using change ID {} from {}".format(change_id, args.repo)) rest = GerritRestAPI(url=args.url) - change_str = "changes/{}?o=CURRENT_REVISION".format(change_id) + change_path = "{}~{}~{}".format(args.repo, quote_plus(args.branch), + change_id) + change_str = "changes/{}?o=CURRENT_REVISION".format(change_path) change = rest.get(change_str) try: assert change['status'] not in 'ABANDONED' 'CLOSED',\ @@ -104,5 +108,6 @@ def main(): parser.print_help() exit(1) + if __name__ == "__main__": main() diff --git a/apex/deploy.py b/apex/deploy.py index 37429773..a0561384 100644 --- a/apex/deploy.py +++ b/apex/deploy.py @@ -280,10 +280,8 @@ def main(): ansible_args = { 'virsh_enabled_networks': net_settings.enabled_network_list } - ansible_path = os.path.join(args.lib_dir, ANSIBLE_PATH) utils.run_ansible(ansible_args, - os.path.join(args.lib_dir, - ansible_path, + os.path.join(args.lib_dir, ANSIBLE_PATH, 'deploy_dependencies.yml')) uc_external = False if 'external' in net_settings.enabled_network_list: @@ -328,8 +326,7 @@ def main(): args.deploy_dir, APEX_TEMP_DIR) # Install Undercloud undercloud.configure(net_settings, - os.path.join(args.lib_dir, - ansible_path, + os.path.join(args.lib_dir, ANSIBLE_PATH, 'configure_undercloud.yml'), APEX_TEMP_DIR) @@ -344,7 +341,7 @@ def main(): overcloud_deploy.create_deploy_cmd(deploy_settings, net_settings, inventory, APEX_TEMP_DIR, args.virtual, args.env_file) - deploy_playbook = os.path.join(args.lib_dir, ansible_path, + deploy_playbook = os.path.join(args.lib_dir, ANSIBLE_PATH, 'deploy_overcloud.yml') virt_env = 'virtual-environment.yaml' bm_env = 'baremetal-environment.yaml' @@ -415,7 +412,7 @@ def main(): deploy_vars['external_network_ipv6'] = True else: deploy_vars['external_network_ipv6'] = False - post_undercloud = os.path.join(args.lib_dir, ansible_path, + post_undercloud = os.path.join(args.lib_dir, ANSIBLE_PATH, 'post_deploy_undercloud.yml') logging.info("Executing post deploy configuration undercloud playbook") try: @@ -432,7 +429,7 @@ def main(): deploy_vars['vpn'] = ds_opts['vpn'] # TODO(trozet): pull all logs and store in tmp dir in overcloud # playbook - post_overcloud = os.path.join(args.lib_dir, ansible_path, + post_overcloud = os.path.join(args.lib_dir, ANSIBLE_PATH, 'post_deploy_overcloud.yml') # Run per overcloud node for node, ip in deploy_vars['overcloud_nodes'].items(): |