From a4a35f8a4f18abc782008a0e0d1d38bd5cf41ef9 Mon Sep 17 00:00:00 2001 From: Maxime Guyot Date: Thu, 25 Apr 2019 14:24:46 +0200 Subject: [PATCH] Git checkout a specific version for testing upgrades (#4653) --- .gitlab-ci.yml | 4 +++- tests/scripts/testcases_run.sh | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) 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