Skip to content

Commit

Permalink
Add support for setting latest k8s in ab scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
Ole Markus With committed Jun 10, 2021
1 parent 9b4f5b6 commit d3416aa
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/e2e/scenarios/upgrade-ab/run-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,18 @@
REPO_ROOT=$(git rev-parse --show-toplevel);
source "${REPO_ROOT}"/tests/e2e/scenarios/lib/common.sh

if [ -z "$KOPS_VERSION_A" ] || [ -z "$K8S_VERSION_A" ] || [ -z "$KOPS_VERSION_B" ] || [ -z "$K8S_VERSION_B" ]; then
if [ -z "${KOPS_VERSION_A-}" ] || [ -z "${K8S_VERSION_A-}" ] || [ -z "${KOPS_VERSION_B-}" ] || [ -z "${K8S_VERSION_B-}" ]; then
>&2 echo "must set all of KOPS_VERSION_A, K8S_VERSION_A, KOPS_VERSION_B, K8S_VERSION_B env vars"
exit 1
fi

if [[ "$K8S_VERSION_A" == "latest" ]]; then
K8S_VERSION_A=$(curl https://storage.googleapis.com/kubernetes-release/release/latest.txt)
fi
if [[ "$K8S_VERSION_B" == "latest" ]]; then
K8S_VERSION_B=$(curl https://storage.googleapis.com/kubernetes-release/release/latest.txt)
fi

export KOPS_BASE_URL
KOPS_BASE_URL=$(kops-base-from-marker "${KOPS_VERSION_A}")
KOPS_A=$(kops-download-from-base)
Expand Down

0 comments on commit d3416aa

Please sign in to comment.