diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 80ea6e012..43442077f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -36,7 +36,9 @@ before_script: .job: &job tags: - packet - image: quay.io/kubespray/kubespray:v2.9.0 + variables: + KUBESPRAY_VERSION: v2.9.0 + image: quay.io/kubespray/kubespray:$KUBESPRAY_VERSION .testcases: &testcases <<: *job diff --git a/tests/scripts/testcases_run.sh b/tests/scripts/testcases_run.sh index 9028ec5f9..e434095ba 100755 --- a/tests/scripts/testcases_run.sh +++ b/tests/scripts/testcases_run.sh @@ -10,7 +10,7 @@ echo ${PWD} cd tests && make create-${CI_PLATFORM} -s ; cd - # Check out latest tag if testing upgrade -test "${UPGRADE_TEST}" != "false" && git fetch --all && git checkout $(git describe --tags $(git rev-list --tags --max-count=1)) +test "${UPGRADE_TEST}" != "false" && git fetch --all && git checkout "$KUBESPRAY_VERSION" # Checkout the CI vars file so it is available test "${UPGRADE_TEST}" != "false" && git checkout "${CI_BUILD_REF}" tests/files/${CI_JOB_NAME}.yml