From 0ee25482374d821d602071afbff7149d1df43ac4 Mon Sep 17 00:00:00 2001 From: Christian Schlotter Date: Mon, 8 Apr 2024 15:15:43 +0200 Subject: [PATCH] review fixes --- scripts/ci-e2e-lib.sh | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/scripts/ci-e2e-lib.sh b/scripts/ci-e2e-lib.sh index 2080c9cfb837..3c780567ea2f 100644 --- a/scripts/ci-e2e-lib.sh +++ b/scripts/ci-e2e-lib.sh @@ -57,14 +57,19 @@ k8s::prepareKindestImagesVariables() { KUBERNETES_VERSION=$(grep KUBERNETES_VERSION: < "$E2E_CONF_FILE" | awk -F'"' '{ print $2}') echo "Defaulting KUBERNETES_VERSION to ${KUBERNETES_VERSION} to trigger image build (because env var is not set)" fi + fi - # Tests not focusing on [PR-Blocking] or [K8s-Install], also run upgrade tests so default - # KUBERNETES_VERSION_UPGRADE_TO to the value in the e2e config if it is not set. - if [[ ${GINKGO_FOCUS:-} != *"PR-Blocking"* ]] && [[ ${GINKGO_FOCUS:-} != *"K8s-Install"* ]]; then - if [[ -z "${KUBERNETES_VERSION_UPGRADE_TO:-}" ]]; then - KUBERNETES_VERSION_UPGRADE_TO=$(grep KUBERNETES_VERSION_UPGRADE_TO: < "$E2E_CONF_FILE" | awk -F'"' '{ print $2}') - echo "Defaulting KUBERNETES_VERSION_UPGRADE_TO to ${KUBERNETES_VERSION_UPGRADE_TO} to trigger image build (because env var is not set)" - fi + # Tests not focusing on [PR-Blocking], [K8s-Install] or [K8s-Install-ci-latest], + # also run upgrade tests so default KUBERNETES_VERSION_UPGRADE_TO to the value + # in the e2e config if it is not set. + if [[ ${GINKGO_FOCUS:-} != *"PR-Blocking"* ]] && [[ ${GINKGO_FOCUS:-} != *"K8s-Install"* ]]; then + if [[ -z "${KUBERNETES_VERSION_UPGRADE_TO:-}" ]]; then + KUBERNETES_VERSION_UPGRADE_TO=$(grep KUBERNETES_VERSION_UPGRADE_TO: < "$E2E_CONF_FILE" | awk -F'"' '{ print $2}') + echo "Defaulting KUBERNETES_VERSION_UPGRADE_TO to ${KUBERNETES_VERSION_UPGRADE_TO} to trigger image build (because env var is not set)" + fi + if [[ -z "${KUBERNETES_VERSION_UPGRADE_FROM:-}" ]]; then + KUBERNETES_VERSION_UPGRADE_FROM=$(grep KUBERNETES_VERSION_UPGRADE_FROM: < "$E2E_CONF_FILE" | awk -F'"' '{ print $2}') + echo "Defaulting KUBERNETES_VERSION_UPGRADE_FROM to ${KUBERNETES_VERSION_UPGRADE_FROM} to trigger image build (because env var is not set)" fi fi }