diff --git a/release_build.sh b/release_build.sh index 6cacb07..3f5b8f7 100755 --- a/release_build.sh +++ b/release_build.sh @@ -15,8 +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 = .release + ".0") | .release' \ - | awk '{print "kubernetes-v"$1}') + | yq -r '.schedules[] | .previousPatches[0] // (.release = .release + ".0") | .release') if [[ -z "${KBS_VERS}" ]] ; then echo "Failed fetching Kubernetes versions" exit 1 @@ -25,6 +24,21 @@ fi KBS_VERS_ARRAY=(${KBS_VERS}) printf "%s\n" "${KBS_VERS_ARRAY[@]}" +echo "Fetching list of latest CRI-O patch releases" +echo "=================================================" + +git ls-remote --tags --sort=-v:refname https://github.com/cri-o/cri-o \ + | grep -v "{}" \ + | awk '{ print $2}' \ + | cut --delimiter='/' --fields=3 \ + > crio.txt + +CRIO=() +for r in "${KBS_VERS_ARRAY[@]}"; do + version=$(cat crio.txt | grep "v${r%.*}" | head -n1) + CRIO+=( "crio-${version:1}" ) +done + echo echo "Fetching previous 'latest' release sysexts" echo "==========================================" @@ -47,7 +61,15 @@ echo "================" mapfile -t images < <( awk '{ content=sub("[[:space:]]*#.*", ""); if ($0) print $0; }' \ release_build_versions.txt ) -images+=("${KBS_VERS_ARRAY[@]}") + +KUBERNETES=() +for v in "${KBS_VERS_ARRAY[@]}"; do + KUBERNETES+=( "kubernetes-v${v}" ) +done +images+=( "${CRIO[@]}" ) +images+=( "${KUBERNETES[@]}" ) + +echo "building: ${images[@]}" echo "# Release $(date '+%Y-%m-%d %R')" > Release.md echo "The release adds the following sysexts:" >> Release.md @@ -67,8 +89,8 @@ for image in "${images[@]}"; do echo "* ${target}" >> Release.md done streams+=("${component}:-@v") - if [ "${component}" = "kubernetes" ]; then - streams+=("kubernetes-${version%.*}:.@v") + if [ "${component}" = "kubernetes" ] || [ "${component}" = "crio" ]; then + streams+=("${component}-${version%.*}:.@v") # Should give, e.g., v1.28 for v1.28.2 (use ${version#*.*.} to get 2) fi done diff --git a/release_build_versions.txt b/release_build_versions.txt index 6282aa3..56f27ed 100644 --- a/release_build_versions.txt +++ b/release_build_versions.txt @@ -1,6 +1,6 @@ # Versions to build. -# For Kubernetes, we fetch the latest versions to be built. +# For Kubernetes and CRI-O, we fetch the latest versions to be built. # The below lists _additional_ kubernetes versions to be built. kubernetes-v1.28.5 # required for CAPO CI @@ -23,8 +23,6 @@ wasmcloud-1.0.0 tailscale-1.70.0 -crio-1.28.4 - k3s-v1.29.2+k3s1 rke2-v1.29.2+rke2r1