Browse Source
CI: for upgrade testing, checkout old version before provisioning
Otherwise, modifying the test inventory + it's expected structure will
always fail.
pull/11559/head
Max Gautier
1 month ago
Failed to extract signature
1 changed files with
9 additions and
9 deletions
-
tests/scripts/testcases_run.sh
|
@ -15,6 +15,15 @@ else |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
# Check out latest tag if testing upgrade |
|
|
|
|
|
if [ "${UPGRADE_TEST}" != "false" ]; then |
|
|
|
|
|
git fetch --all && git checkout "$KUBESPRAY_VERSION" |
|
|
|
|
|
# Checkout the CI vars file so it is available |
|
|
|
|
|
git checkout "${CI_COMMIT_SHA}" tests/files/${CI_JOB_NAME}.yml |
|
|
|
|
|
git checkout "${CI_COMMIT_SHA}" ${CI_TEST_REGISTRY_MIRROR} |
|
|
|
|
|
git checkout "${CI_COMMIT_SHA}" ${CI_TEST_SETTING} |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
# needed for ara not to complain |
|
|
# needed for ara not to complain |
|
|
export TZ=UTC |
|
|
export TZ=UTC |
|
|
|
|
|
|
|
@ -41,15 +50,6 @@ if [[ "$CI_JOB_NAME" =~ "opensuse" ]]; then |
|
|
ansible all -m raw -a 'zypper --gpg-auto-import-keys refresh' |
|
|
ansible all -m raw -a 'zypper --gpg-auto-import-keys refresh' |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
# Check out latest tag if testing upgrade |
|
|
|
|
|
if [ "${UPGRADE_TEST}" != "false" ]; then |
|
|
|
|
|
git fetch --all && git checkout "$KUBESPRAY_VERSION" |
|
|
|
|
|
# Checkout the CI vars file so it is available |
|
|
|
|
|
git checkout "${CI_COMMIT_SHA}" tests/files/${CI_JOB_NAME}.yml |
|
|
|
|
|
git checkout "${CI_COMMIT_SHA}" ${CI_TEST_REGISTRY_MIRROR} |
|
|
|
|
|
git checkout "${CI_COMMIT_SHA}" ${CI_TEST_SETTING} |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
run_playbook () { |
|
|
run_playbook () { |
|
|
playbook=$1 |
|
|
playbook=$1 |
|
|
shift |
|
|
shift |
|
|