summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkos Chandras <mchandras@suse.de>2017-12-05 17:27:00 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-12-05 17:27:00 +0000
commit22c401e5aed10e09b4849673f3a6bd0defbb504a (patch)
tree68b44f700d4deb18c33836ae97e2f3bc49bbf6a7
parent1de24fc5ac68ac4857a6dfb345fa405c42ba95f1 (diff)
parent1cfd0c6cdfd5919d269c651e1db455a16361b475 (diff)
Merge "xci: Allow variable overrides from external scenarios"
-rwxr-xr-xxci/config/user-vars1
-rw-r--r--xci/playbooks/get-opnfv-scenario-requirements.yml4
-rw-r--r--xci/var/opnfv.yml1
-rwxr-xr-xxci/xci-deploy.sh4
4 files changed, 7 insertions, 3 deletions
diff --git a/xci/config/user-vars b/xci/config/user-vars
index e9980e3..14c0ca4 100755
--- a/xci/config/user-vars
+++ b/xci/config/user-vars
@@ -35,6 +35,7 @@ export OPENSTACK_OSA_OPENRC_PATH="${XCI_DEVEL_ROOT}/openstack-ansible-openstack_
export OPENSTACK_BIFROST_PATH="${XCI_DEVEL_ROOT}/bifrost"
export OPENSTACK_OSA_PATH="${XCI_DEVEL_ROOT}/openstack-ansible"
export OPNFV_SSH_HOST_KEYS_PATH="${XCI_DEVEL_ROOT}/ssh_host_keys"
+export XCI_SCENARIOS_CACHE="${XCI_PATH}/.cache/repos/scenarios"
#-------------------------------------------------------------------------------
# Set the playbook to use for OpenStack deployment
diff --git a/xci/playbooks/get-opnfv-scenario-requirements.yml b/xci/playbooks/get-opnfv-scenario-requirements.yml
index a7b177e..c59c18f 100644
--- a/xci/playbooks/get-opnfv-scenario-requirements.yml
+++ b/xci/playbooks/get-opnfv-scenario-requirements.yml
@@ -18,6 +18,8 @@
hosts: localhost
connection: local
gather_facts: true
+ vars_files:
+ - ../var/opnfv.yml
tasks:
- name: Remove target directory
file:
@@ -53,7 +55,7 @@
ansible_python_interpreter: "/usr/bin/python"
scenarios: "{{ lookup('file', scenario_file) | from_yaml }}"
scenario_file: '../opnfv-scenario-requirements.yml'
- scenario_path_default: "{{ lookup('env', 'XCI_PATH') }}/.cache/repos/scenarios"
+ scenario_path_default: "{{ XCI_SCENARIOS_CACHE }}"
role_path_default: "{{ playbook_dir }}/roles"
git_clone_retries: 2
git_clone_retry_delay: 5
diff --git a/xci/var/opnfv.yml b/xci/var/opnfv.yml
index 287f884..9eefe6c 100644
--- a/xci/var/opnfv.yml
+++ b/xci/var/opnfv.yml
@@ -27,6 +27,7 @@ XCI_FLAVOR: "{{ lookup('env','XCI_FLAVOR') }}"
XCI_FLAVOR_ANSIBLE_FILE_PATH: "{{ lookup('env','XCI_FLAVOR_ANSIBLE_FILE_PATH') }}"
XCI_LOOP: "{{ lookup('env','XCI_LOOP') }}"
XCI_PATH: "{{ lookup('env', 'XCI_PATH') }}/"
+XCI_SCENARIOS_CACHE: "{{ lookup('env', 'XCI_SCENARIOS_CACHE') }}"
LOG_PATH: "{{ lookup('env','LOG_PATH') }}"
OPNFV_HOST_IP: "{{ lookup('env','OPNFV_HOST_IP') }}"
OPNFV_SSH_HOST_KEYS_PATH: "{{ lookup('env', 'OPNFV_SSH_HOST_KEYS_PATH') }}"
diff --git a/xci/xci-deploy.sh b/xci/xci-deploy.sh
index fde2944..cbc39e2 100755
--- a/xci/xci-deploy.sh
+++ b/xci/xci-deploy.sh
@@ -143,8 +143,8 @@ echo "-------------------------------------------------------------------------"
#-------------------------------------------------------------------------------
# Get scenario variables overrides
#-------------------------------------------------------------------------------
-if [[ -f $XCI_PATH/xci/scenarios/${OPNFV_SCENARIO:-_no_scenario_}/xci_overrides ]]; then
- source $XCI_PATH/xci/scenarios/$OPNFV_SCENARIO/xci_overrides
+if [[ -f $XCI_SCENARIOS_CACHE/${OPNFV_SCENARIO:-_no_scenario_}/xci_overrides ]]; then
+ source $XCI_SCENARIOS_CACHE/$OPNFV_SCENARIO/xci_overrides
fi
#-------------------------------------------------------------------------------