Skip to content

Commit

Permalink
add KUBECTL_SHA256 export for upgrade tests
Browse files Browse the repository at this point in the history
Pass thru KUBECTL_SHA256 from JJB for upgrade e2e tests.

Cherry-pick of metal3-io#1178.
  • Loading branch information
tuminoid committed Sep 5, 2023
1 parent bc681c5 commit df392a5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
9 changes: 5 additions & 4 deletions scripts/ci-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
3 changes: 3 additions & 0 deletions scripts/environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
Expand Down

0 comments on commit df392a5

Please sign in to comment.