Browse Source

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

pull/4655/head
Maxime Guyot 5 years ago
committed by Kubernetes Prow Robot
parent
commit
a4a35f8a4f
2 changed files with 4 additions and 2 deletions
  1. 4
      .gitlab-ci.yml
  2. 2
      tests/scripts/testcases_run.sh

4
.gitlab-ci.yml

@ -36,7 +36,9 @@ before_script:
.job: &job .job: &job
tags: tags:
- packet - packet
image: quay.io/kubespray/kubespray:v2.9.0
variables:
KUBESPRAY_VERSION: v2.9.0
image: quay.io/kubespray/kubespray:$KUBESPRAY_VERSION
.testcases: &testcases .testcases: &testcases
<<: *job <<: *job

2
tests/scripts/testcases_run.sh

@ -10,7 +10,7 @@ echo ${PWD}
cd tests && make create-${CI_PLATFORM} -s ; cd - cd tests && make create-${CI_PLATFORM} -s ; cd -
# Check out latest tag if testing upgrade # 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 # Checkout the CI vars file so it is available
test "${UPGRADE_TEST}" != "false" && git checkout "${CI_BUILD_REF}" tests/files/${CI_JOB_NAME}.yml test "${UPGRADE_TEST}" != "false" && git checkout "${CI_BUILD_REF}" tests/files/${CI_JOB_NAME}.yml

Loading…
Cancel
Save