Run the e2e test on multiple k8s versions#89
Conversation
jlebon
left a comment
There was a problem hiding this comment.
Ideally we'd have a single buildimg in a separate job, push it to ghcr, and then the matrix test, and then another job for pushing. But pushing to ghcr is privileged and I don't want to add those privs (I think Zizmor would also complain). We could podman save and podman load I guess? It's hacky but the image is not that large either.
|
|
||
| - name: Push to GHCR | ||
| if: github.event_name == 'push' | ||
| if: github.event_name == 'push' && matrix.kube-minor == steps.defaults.outputs.kube-minor |
There was a problem hiding this comment.
Hmm, I understand why we need this (so that it only happens once), but that's not obvious from this. I wonder if there's a more GHA native way to do this that still avoids having to rebuild the image. Otherwise, let's at least add a comment.
I also don't like to push to ghcr at every run of the CI and untested images. |
Define the default kubernetes version and set it to 1.35. Assisted-by: AI Signed-off-by: Alice Frosi <afrosi@redhat.com>
Define the build of the bootc-operator image in a separate job. This will help to reuse the same image in parallel jobs introduce in the next commits. Since the image is built in a separate job, we need to save and load the image at different steps. Assisted-by: AI Signed-off-by: Alice Frosi <afrosi@redhat.com>
Define the push also in a separate job as the build. In order to reference the same image, also in this stage it needs to be loaded by the tarball created at the previous stage. Assisted-by: AI Signed-off-by: Alice Frosi <afrosi@redhat.com>
Introduce a new step 'supported-versions' for fetching the supported kubernetes versions. The versions are dynamically fetched from https://endoflife.date/api/kubernetes.json. The e2e job has a strategy fail-fast equal to false in this way, the parallel job run independently and the other aren't killed if one fails. Assisted-by: AI Signed-off-by: Alice Frosi <afrosi@redhat.com>
eb5177d to
af81a9b
Compare
jlebon
left a comment
There was a problem hiding this comment.
Thank you, this is great!
I had to change the ruleset for main to no longer require e2e and instead require e2e (1.34), e2e (1.35), and e2e (1.36).
That's fine for now, but perhaps we should add a simple e.g. e2e-collect which just needs all the matrix branches. And then the ruleset can just require that one.
Not sure, perhaps there's a cleaner way to do this.
| print-var-%: | ||
| @echo $($*) | ||
|
|
There was a problem hiding this comment.
Minor: don't really need this anymore. But fine to keep too.
Test the bootc-operator on all the active kuberentes versions. The version are dynamically fetched from https://endoflife.date/api/kubernetes.json
Fixes: #48