get-kube.sh: fix order to get the binaries from the right bucket

This commit is contained in:
Carlos Panato 2020-06-01 17:51:12 +02:00
parent b618411f1e
commit 715aa8b733
No known key found for this signature in database
GPG Key ID: E2379A61085D0517

View File

@ -183,11 +183,16 @@ release=${KUBERNETES_RELEASE:-"release/stable"}
# Translate a published version <bucket>/<version> (e.g. "release/stable") to version number.
set_binary_version "${release}"
if [[ -z "${KUBERNETES_SKIP_RELEASE_VALIDATION-}" ]]; then
if [[ ${KUBE_VERSION} =~ ${KUBE_CI_VERSION_REGEX} ]]; then
if [[ ${KUBE_VERSION} =~ ${KUBE_RELEASE_VERSION_REGEX} ]]; then
# Use KUBERNETES_RELEASE_URL for Releases and Pre-Releases
# ie. 1.18.0 or 1.19.0-beta.0
KUBERNETES_RELEASE_URL="${KUBERNETES_RELEASE_URL}"
elif [[ ${KUBE_VERSION} =~ ${KUBE_CI_VERSION_REGEX} ]]; then
# Override KUBERNETES_RELEASE_URL to point to the CI bucket;
# this will be used by get-kube-binaries.sh.
# ie. v1.19.0-beta.0.318+b618411f1edb98
KUBERNETES_RELEASE_URL="${KUBERNETES_CI_RELEASE_URL}"
elif ! [[ ${KUBE_VERSION} =~ ${KUBE_RELEASE_VERSION_REGEX} ]]; then
else
echo "Version doesn't match regexp" >&2
exit 1
fi