-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build all Kubernetes versions available. Fix for https://github.com/flatcar/Flatcar/issues/1293 #36
Conversation
.github/workflows/release.yaml
Outdated
|
||
images=( | ||
"kubernetes-v1.28.2" | ||
$(curl https://raw.githubusercontent.com/kubernetes/website/main/data/releases/schedule.yaml | yq -r '.schedules[].previousPatches[0].release' | awk '{print "kubernetes-v"$1}') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, we need to move the curl call into it's own line for error handling (i.e., K8S_VERS=$(curl …)
), and also add some common curl options for robustness: -fsSL --retry-delay 1 --retry 60 --retry-connrefused --retry-max-time 60 --connect-timeout 20
I think we also need to filter out future targetDate
entries, or?
I have done the following additional changes:
Jan Hugo Prins |
.github/workflows/release.yaml
Outdated
"docker-24.0.6" | ||
"docker_compose-2.22.0" | ||
"wasmtime-13.0.0" | ||
) | ||
images+=(${KBS_VERS_ARRAY[@]}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
images+=(${KBS_VERS_ARRAY[@]}) | |
images+=("${KBS_VERS_ARRAY[@]}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. Will modify.
.github/workflows/release.yaml
Outdated
gawk | ||
|
||
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' | awk '{print "kubernetes-v"$1}') | ||
[[ -z "${KBS_VERS}" ]] && exit 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[[ -z "${KBS_VERS}" ]] && exit 1 | |
if [[ -z "${KBS_VERS}" ]]; then; echo "Failed fetching Kubernetes versions"; exit 1; fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't really like that if construct. I will make it a little different, but functional the same.
I hope you will agree.
[[ -z "${KBS_VERS}" ]] && exit 1 | |
[[ -z "${KBS_VERS}" ]] && echo "Failed fetching Kubernetes versions" && exit 1 |
With that I meant that while the current entries have no future dates that might be the case and then the k8s version can't be downloaded because it's not released yet. |
No, this is not true. |
Do the curl in a seperate line and check if the string contains items. Some better error handling.
[Title: describe the change in one sentence]
Modify the workflow file to download information about available Kubernetes versions and build all raw images for the last maintenance release for every main release.
How to use
[ describe what reviewers need to do in order to validate this PR ]
Testing done
[Describe the testing you have done before submitting this PR. Please include both the commands you issued as well as the output you got.]