Git checkout a specific version for testing upgrades (#4653)

This commit is contained in:
Maxime Guyot 2019-04-25 14:24:46 +02:00 committed by Kubernetes Prow Robot
parent 82119ca923
commit a4a35f8a4f
2 changed files with 4 additions and 2 deletions

View file

@ -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

View file

@ -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