From df392a5e222b02f25e736f44989bb4b65fb28052 Mon Sep 17 00:00:00 2001 From: Tuomo Tanskanen Date: Mon, 4 Sep 2023 11:27:38 +0300 Subject: [PATCH] add KUBECTL_SHA256 export for upgrade tests Pass thru KUBECTL_SHA256 from JJB for upgrade e2e tests. Cherry-pick of #1178. --- scripts/ci-e2e.sh | 9 +++++---- scripts/environment.sh | 3 +++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/scripts/ci-e2e.sh b/scripts/ci-e2e.sh index 8f52568187..d1e9c03d24 100755 --- a/scripts/ci-e2e.sh +++ b/scripts/ci-e2e.sh @@ -11,16 +11,16 @@ FORCE_REPO_UPDATE="${FORCE_REPO_UPDATE:-false}" export CAPM3RELEASEBRANCH="${CAPM3RELEASEBRANCH:-main}" # Starting from CAPI v1.5.0 version cluster-api config folder location has changed -# to XDG_CONFIG_HOME folder. Following code defines the cluster-api config folder -# location according to CAPM3(since CAPM3 minor versions are aligned to CAPI -# minors versions) release branch +# to XDG_CONFIG_HOME folder. Following code defines the cluster-api config folder +# location according to CAPM3(since CAPM3 minor versions are aligned to CAPI +# minors versions) release branch if [[ ${CAPM3RELEASEBRANCH} == "release-1.3" ]] || [[ ${CAPM3RELEASEBRANCH} == "release-1.4" ]]; then export CAPI_CONFIG_FOLDER="${HOME}/.cluster-api" else # Default CAPI_CONFIG_FOLDER to $HOME/.config folder if XDG_CONFIG_HOME not set CONFIG_FOLDER="${XDG_CONFIG_HOME:-$HOME/.config}" - export CAPI_CONFIG_FOLDER="${CONFIG_FOLDER}/cluster-api" + export CAPI_CONFIG_FOLDER="${CONFIG_FOLDER}/cluster-api" fi # shellcheck source=./scripts/environment.sh @@ -40,6 +40,7 @@ export CAPI_VERSION=${CAPI_VERSION:-"v1beta1"} export CAPM3_VERSION=${CAPM3_VERSION:-"v1beta1"} export NUM_NODES=${NUM_NODES:-"4"} export KUBERNETES_VERSION=${KUBERNETES_VERSION} +export KUBECTL_SHA256=${KUBECTL_SHA256} export IMAGE_OS=${IMAGE_OS} export FORCE_REPO_UPDATE="false" EOF diff --git a/scripts/environment.sh b/scripts/environment.sh index 4e7d357aa6..c19b81843b 100644 --- a/scripts/environment.sh +++ b/scripts/environment.sh @@ -50,6 +50,9 @@ fi export FROM_K8S_VERSION=${FROM_K8S_VERSION:-"v1.27.4"} export KUBERNETES_VERSION=${KUBERNETES_VERSION:-"v1.28.1"} +# NOTE: kubectl sha256 must match the provided KUBERNETES_VERSION, and must be +# provided in JJB for upgrade tests where version is different from the default +export KUBECTL_SHA256="${KUBECTL_SHA256:-e7a7d6f9d06fab38b4128785aa80f65c54f6675a0d2abef655259ddd852274e1}" # Can be overriden from jjbs export CAPI_VERSION=${CAPI_VERSION:-"v1beta1"}