From a301cce39b18a080e655ed5546ff7658b5f96282 Mon Sep 17 00:00:00 2001 From: Mathieu Tortuyaux Date: Thu, 18 Apr 2024 14:23:15 +0200 Subject: [PATCH] release: handle new major release of kubernetes When there is a new major of Kubernetes there is no `previousPatches` in the `schedule.yaml` file: ```yaml - release: 1.30 releaseDate: 2024-04-17 next: release: 1.30.1 cherryPickDeadline: 2024-05-10 targetDate: 2024-05-15 maintenanceModeStartDate: 2025-04-28 endOfLifeDate: 2025-06-28 ``` In this case, we extend the current `release` with `.0` to build the full version. Signed-off-by: Mathieu Tortuyaux --- release_build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release_build.sh b/release_build.sh index 5459270..6cacb07 100755 --- a/release_build.sh +++ b/release_build.sh @@ -15,7 +15,7 @@ echo "=================================================" KBS_VERS=$(curl -fsSL --retry-delay 1 --retry 60 --retry-connrefused \ --retry-max-time 60 --connect-timeout 20 \ https://raw.githubusercontent.com/kubernetes/website/main/data/releases/schedule.yaml \ - | yq -r '.schedules[].previousPatches[0].release' \ + | yq -r '.schedules[] | .previousPatches[0] // (.release = .release + ".0") | .release' \ | awk '{print "kubernetes-v"$1}') if [[ -z "${KBS_VERS}" ]] ; then echo "Failed fetching Kubernetes versions"