diff --git a/murano-ci/scripts/functions.inc b/murano-ci/scripts/functions.inc index e58fa1af..2f81bba5 100644 --- a/murano-ci/scripts/functions.inc +++ b/murano-ci/scripts/functions.inc @@ -217,10 +217,6 @@ function override_refference() { function remove_image_with_murano_agent() { - pushd "${STACK_HOME}/devstack" - source openrc "${ADMIN_USERNAME}" "${ADMIN_TENANT}" - popd - for i in $(glance image-list | get_field 2); do if [ "${DISTR_NAME}_${BUILD_NUMBER}" == "$i" ]; then glance image-delete "$i" @@ -230,10 +226,6 @@ function remove_image_with_murano_agent() { function save_image_with_murano_agent() { - pushd "${STACK_HOME}/devstack" - source openrc "${ADMIN_USERNAME}" "${ADMIN_TENANT}" - popd - for i in $(glance image-list | get_field 2); do if [ "${DISTR_NAME}_latest" == "$i" ]; then glance image-delete "$i" @@ -256,11 +248,6 @@ function ensure_no_heat_stacks_left() { pushd "${STACK_HOME}/devstack" - set +o xtrace - echo "Importing openrc ..." - source openrc "${ADMIN_USERNAME}" "${ADMIN_TENANT}" - set -o xtrace - for id in $(sed -n 's/.*\"OS\:\:stack_id\"\: \"\(.\{36\}\)\".*/\1/p' "${log_file}" | sort | uniq); do stack_info=$(heat stack-list | grep "${id}") if [ -n "${stack_info}" ]; then @@ -278,6 +265,7 @@ function ensure_no_heat_stacks_left() { } function tear_down() { + if [[ "${PROJECT_NAME}" == 'murano-agent' ]]; then remove_image_with_murano_agent fi diff --git a/murano-ci/scripts/start_gate.sh b/murano-ci/scripts/start_gate.sh index 4becf1d4..baa0e236 100644 --- a/murano-ci/scripts/start_gate.sh +++ b/murano-ci/scripts/start_gate.sh @@ -21,5 +21,13 @@ source "${CI_ROOT_DIR}/scripts/common.inc" #----------------- source "${CI_ROOT_DIR}/scripts/deploy_devstack.sh" + +pushd "${STACK_HOME}/devstack" +set +o xtrace +echo "Importing openrc ..." +source openrc "${ADMIN_USERNAME}" "${ADMIN_TENANT}" +set -o xtrace +popd + source "${CI_ROOT_DIR}/scripts/prepare_tests.sh" source "${CI_ROOT_DIR}/scripts/run_tests.sh"