mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	Merge pull request #43642 from ixdy/release-candidate-regexes
Automatic merge from submit-queue (batch tested with PRs 43642, 43170, 41813, 42170, 41581) Update a few regex patterns to support release candidates **What this PR does / why we need it**: A release candidate was cut for 1.6 (v1.6.0-rc.1), but some scripts don't recognize this version string. **Release note**: ```release-note NONE ```
This commit is contained in:
		@@ -45,7 +45,7 @@ readonly RELEASE_DIR="${LOCAL_OUTPUT_ROOT}/release-tars"
 | 
				
			|||||||
#   VERSION_COMMITS        (e.g. '56')
 | 
					#   VERSION_COMMITS        (e.g. '56')
 | 
				
			||||||
function kube::release::parse_and_validate_ci_version() {
 | 
					function kube::release::parse_and_validate_ci_version() {
 | 
				
			||||||
  # Accept things like "v1.2.3-alpha.4.56+abcdef12345678" or "v1.2.3-beta.4"
 | 
					  # Accept things like "v1.2.3-alpha.4.56+abcdef12345678" or "v1.2.3-beta.4"
 | 
				
			||||||
  local -r version_regex="^v(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)-(beta|alpha)\\.(0|[1-9][0-9]*)(\\.(0|[1-9][0-9]*)\\+[0-9a-f]{7,40})?$"
 | 
					  local -r version_regex="^v(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)-(beta|alpha|rc)\\.(0|[1-9][0-9]*)(\\.(0|[1-9][0-9]*)\\+[0-9a-f]{7,40})?$"
 | 
				
			||||||
  local -r version="${1-}"
 | 
					  local -r version="${1-}"
 | 
				
			||||||
  [[ "${version}" =~ ${version_regex} ]] || {
 | 
					  [[ "${version}" =~ ${version_regex} ]] || {
 | 
				
			||||||
    kube::log::error "Invalid ci version: '${version}', must match regex ${version_regex}"
 | 
					    kube::log::error "Invalid ci version: '${version}', must match regex ${version_regex}"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -30,15 +30,15 @@ source "${KUBE_ROOT}/cluster/lib/logging.sh"
 | 
				
			|||||||
#
 | 
					#
 | 
				
			||||||
# NOTE This must match the version_regex in build/common.sh
 | 
					# NOTE This must match the version_regex in build/common.sh
 | 
				
			||||||
# kube::release::parse_and_validate_release_version()
 | 
					# kube::release::parse_and_validate_release_version()
 | 
				
			||||||
KUBE_RELEASE_VERSION_REGEX="^v(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(-(beta|alpha)\\.(0|[1-9][0-9]*))?$"
 | 
					KUBE_RELEASE_VERSION_REGEX="^v(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(-(beta|alpha|rc)\\.(0|[1-9][0-9]*))?$"
 | 
				
			||||||
KUBE_RELEASE_VERSION_DASHED_REGEX="v(0|[1-9][0-9]*)-(0|[1-9][0-9]*)-(0|[1-9][0-9]*)(-(beta|alpha)-(0|[1-9][0-9]*))?"
 | 
					KUBE_RELEASE_VERSION_DASHED_REGEX="v(0|[1-9][0-9]*)-(0|[1-9][0-9]*)-(0|[1-9][0-9]*)(-(beta|alpha|rc)-(0|[1-9][0-9]*))?"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# KUBE_CI_VERSION_REGEX matches things like "v1.2.3-alpha.4.56+abcdefg" This
 | 
					# KUBE_CI_VERSION_REGEX matches things like "v1.2.3-alpha.4.56+abcdefg" This
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# NOTE This must match the version_regex in build/common.sh
 | 
					# NOTE This must match the version_regex in build/common.sh
 | 
				
			||||||
# kube::release::parse_and_validate_ci_version()
 | 
					# kube::release::parse_and_validate_ci_version()
 | 
				
			||||||
KUBE_CI_VERSION_REGEX="^v(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)-(beta|alpha)\\.(0|[1-9][0-9]*)(\\.(0|[1-9][0-9]*)\\+[-0-9a-z]*)?$"
 | 
					KUBE_CI_VERSION_REGEX="^v(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)-(beta|alpha|rc)\\.(0|[1-9][0-9]*)(\\.(0|[1-9][0-9]*)\\+[-0-9a-z]*)?$"
 | 
				
			||||||
KUBE_CI_VERSION_DASHED_REGEX="^v(0|[1-9][0-9]*)-(0|[1-9][0-9]*)-(0|[1-9][0-9]*)-(beta|alpha)-(0|[1-9][0-9]*)(-(0|[1-9][0-9]*)\\+[-0-9a-z]*)?"
 | 
					KUBE_CI_VERSION_DASHED_REGEX="^v(0|[1-9][0-9]*)-(0|[1-9][0-9]*)-(0|[1-9][0-9]*)-(beta|alpha|rc)-(0|[1-9][0-9]*)(-(0|[1-9][0-9]*)\\+[-0-9a-z]*)?"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Generate kubeconfig data for the created cluster.
 | 
					# Generate kubeconfig data for the created cluster.
 | 
				
			||||||
# Assumed vars:
 | 
					# Assumed vars:
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -65,8 +65,8 @@ set -o pipefail
 | 
				
			|||||||
KUBERNETES_CI_RELEASE_URL="${KUBERNETES_CI_RELEASE_URL:-${KUBERNETES_RELEASE_URL:-https://dl.k8s.io/ci}}"
 | 
					KUBERNETES_CI_RELEASE_URL="${KUBERNETES_CI_RELEASE_URL:-${KUBERNETES_RELEASE_URL:-https://dl.k8s.io/ci}}"
 | 
				
			||||||
KUBERNETES_RELEASE_URL="${KUBERNETES_RELEASE_URL:-https://dl.k8s.io}"
 | 
					KUBERNETES_RELEASE_URL="${KUBERNETES_RELEASE_URL:-https://dl.k8s.io}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
KUBE_RELEASE_VERSION_REGEX="^v(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(-(beta|alpha)\\.(0|[1-9][0-9]*))?$"
 | 
					KUBE_RELEASE_VERSION_REGEX="^v(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(-(beta|alpha|rc)\\.(0|[1-9][0-9]*))?$"
 | 
				
			||||||
KUBE_CI_VERSION_REGEX="^v(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)-(beta|alpha)\\.(0|[1-9][0-9]*)(\\.(0|[1-9][0-9]*)\\+[-0-9a-z]*)?$"
 | 
					KUBE_CI_VERSION_REGEX="^v(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)-(beta|alpha|rc)\\.(0|[1-9][0-9]*)(\\.(0|[1-9][0-9]*)\\+[-0-9a-z]*)?$"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Sets KUBE_VERSION variable if an explicit version number was provided (e.g. "v1.0.6",
 | 
					# Sets KUBE_VERSION variable if an explicit version number was provided (e.g. "v1.0.6",
 | 
				
			||||||
# "v1.2.0-alpha.1.881+376438b69c7612") or resolves the "published" version
 | 
					# "v1.2.0-alpha.1.881+376438b69c7612") or resolves the "published" version
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user