Skip to content

Commit

Permalink
release: handle new major release of kubernetes
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
tormath1 committed Apr 18, 2024
1 parent 313b804 commit a301cce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion release_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit a301cce

Please sign in to comment.