diff --git a/config/nodepool/scripts/prepare_node.sh b/config/nodepool/scripts/prepare_node.sh index 93eac85e..e0e7475e 100755 --- a/config/nodepool/scripts/prepare_node.sh +++ b/config/nodepool/scripts/prepare_node.sh @@ -57,6 +57,7 @@ sudo service mysql stop sudo pip install -U $PIP_PACKAGES git clone https://git.openstack.org/openstack/sahara /tmp/sahara +git clone https://git.openstack.org/openstack/sahara-scenario /tmp/sahara-scenario sudo pip install -U -r /tmp/sahara/requirements.txt git clone https://git.openstack.org/openstack-infra/project-config /tmp/project-config sudo mkdir -p /usr/local/jenkins/ diff --git a/slave-scripts/dib.sh b/slave-scripts/dib.sh index 3010a6df..528a08b4 100755 --- a/slave-scripts/dib.sh +++ b/slave-scripts/dib.sh @@ -10,8 +10,9 @@ CLUSTER_HASH=${CLUSTER_HASH:-$RANDOM} cluster_name="$HOST-$ZUUL_CHANGE-$CLUSTER_HASH" SAHARA_PATH="/tmp/sahara" +SAHARA_TESTS_PATH="/tmp/sahara-scenario" sahara_conf_file="$SAHARA_PATH/etc/sahara/sahara.conf" -sahara_templates_path=$SAHARA_PATH/etc/scenario/sahara-ci +sahara_templates_path=$SAHARA_TESTS_PATH/etc/scenario/sahara-ci engine=$(echo $JOB_NAME | awk -F '-' '{ print $3 }') @@ -25,6 +26,9 @@ sahara_plugin=$(echo $plugin | awk -F '_' '{ print $1 } ') # Clone Sahara get_dependency "$SAHARA_PATH" "openstack/sahara" +# Clone Sahara Scenario tests +get_dependency "$SAHARA_TESTS_PATH" "openstack/sahara-scenario" + # make verbose the scripts execution of disk-image-create export DIB_DEBUG_TRACE=1 diff --git a/slave-scripts/functions-common.sh b/slave-scripts/functions-common.sh index f72cfb91..d0869ed0 100755 --- a/slave-scripts/functions-common.sh +++ b/slave-scripts/functions-common.sh @@ -1,7 +1,7 @@ #!/bin/bash -xe configs_path=$WORKSPACE/sahara-ci-config/config -template_vars_file=template_vars.ini +template_vars_file=/tmp/sahara-scenario/template_vars.ini eval ci_flavor_id="\'20\'" eval medium_flavor_id="\'3\'" @@ -116,16 +116,18 @@ run_tests() { scenario_edp="$templates_path/edp.yaml" fi # Temporary use additional log file, due to wrong status code from tox scenario tests + pushd $SAHARA_TESTS_PATH if [ "$ZUUL_BRANCH" == "stable/kilo" ]; then scenario_credentials=${scenario_credentials%.*} scenario_config=${scenario_config%.*} - tox -e scenario $scenario_credentials $scenario_edp $scenario_config | tee tox.log + tox -e venv -- sahara-scenario $scenario_credentials $scenario_edp $scenario_config | tee tox.log else # tox -e scenario -- --verbose -V $template_vars_file $scenario_credentials $scenario_edp $scenario_config || failure "Integration tests are failed" - tox -e scenario -- --verbose -V $template_vars_file $scenario_credentials $scenario_edp $scenario_config | tee tox.log + tox -e venv -- sahara-scenario --verbose -V $template_vars_file $scenario_credentials $scenario_edp $scenario_config | tee tox.log fi STATUS=$(grep "\ -\ Failed" tox.log | awk '{print $3}') if [ "$STATUS" != "0" ]; then failure "Integration tests have failed"; fi + popd } scenario_has_option() { diff --git a/slave-scripts/gate-sahara.sh b/slave-scripts/gate-sahara.sh index 804ffd9c..53c8cb8b 100755 --- a/slave-scripts/gate-sahara.sh +++ b/slave-scripts/gate-sahara.sh @@ -9,8 +9,12 @@ CLUSTER_HASH=${CLUSTER_HASH:-$RANDOM} cluster_name="$HOST-$ZUUL_CHANGE-$CLUSTER_HASH" SAHARA_PATH=${1:-$WORKSPACE} +SAHARA_TESTS_PATH="/tmp/sahara-scenario" sahara_conf_file=$SAHARA_PATH/etc/sahara/sahara.conf -sahara_templates_path=$SAHARA_PATH/etc/scenario/sahara-ci +sahara_templates_path=$SAHARA_TESTS_PATH/etc/scenario/sahara-ci + +# Clone Sahara Scenario tests +get_dependency "$SAHARA_TESTS_PATH" "openstack/sahara-scenario" engine_type=$(echo $JOB_NAME | awk -F '-' '{ print $4 }') plugin=$(echo $JOB_NAME | awk -F '-' '{ print $5 }')