Skip to content

Commit

Permalink
default KUBERNETES_VERSION if not set
Browse files Browse the repository at this point in the history
  • Loading branch information
chrischdi committed Apr 4, 2024
1 parent 3930054 commit 5666856
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scripts/ci-e2e-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,15 @@ k8s::prepareKindestImages() {
kind::prepareKindestImage "$resolveVersion"
fi

# If the test focuses on [PR-Blocking], default KUBERNETES_VERSION
# to the value in the e2e config if it is not set.
# Note: We do this because kind images might not yet be released.
if [[ "${GINKGO_FOCUS}" == "\[PR-Blocking\]" ]; then
if [[ -z "${KUBERNETES_VERSION:-}" ]]; then
fi
KUBERNETES_VERSION=$(grep KUBERNETES_VERSION: < "$E2E_CONF_FILE" | awk -F'"' '{ print $2}')
fi

if [ -n "${KUBERNETES_VERSION:-}" ]; then
k8s::resolveVersion "KUBERNETES_VERSION" "$KUBERNETES_VERSION"
export KUBERNETES_VERSION=$resolveVersion
Expand Down

0 comments on commit 5666856

Please sign in to comment.