From 5ba8a638887ebe91582b2eb9bd5b24ea94382568 Mon Sep 17 00:00:00 2001 From: Alice Frosi Date: Fri, 3 Jul 2026 13:44:47 +0000 Subject: [PATCH 1/4] makefile: extract DEFAULT_KUBE_MINOR variable Define the default kubernetes version and set it to 1.35. Assisted-by: AI Signed-off-by: Alice Frosi --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 490f271..c9e5f7d 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,8 @@ CONTAINER_TOOL ?= podman BINK_CLUSTER_NAME ?= e2e KUBECONFIG_BINK ?= ./kubeconfig-$(BINK_CLUSTER_NAME) ARTIFACTS ?= $(abspath _output/logs) -BINK_NODE_DISK_IMAGE ?= ghcr.io/bootc-dev/bink/node:v1.35-fedora-44-disk +DEFAULT_KUBE_MINOR ?= 1.35 +BINK_NODE_DISK_IMAGE ?= ghcr.io/bootc-dev/bink/node:v$(DEFAULT_KUBE_MINOR)-fedora-44-disk BINK_LOCAL_REGISTRY_NODE_IMAGE ?= registry.cluster.local:5000/node # YEAR defines the year value used for substituting the YEAR placeholder in the boilerplate header. YEAR ?= $(shell date +%Y) @@ -21,6 +22,9 @@ all: build ##@ General +print-var-%: + @echo $($*) + .PHONY: help help: ## Display this help. @awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST) From 6de2fe132fa25a9cd97c8c4fc67a303ac5c0213e Mon Sep 17 00:00:00 2001 From: Alice Frosi Date: Fri, 3 Jul 2026 13:47:51 +0000 Subject: [PATCH 2/4] ci: build operator image in a separate job 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 --- .github/workflows/ci.yaml | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 461a3e9..d58c55b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -83,13 +83,34 @@ jobs: name: bink path: bink + build-operator: + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - name: Checkout + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + with: + persist-credentials: false + + - name: Build operator image + run: make buildimg + + - name: Save operator image + run: podman save -o operator-image.tar bootc-operator:dev + + - name: Upload operator image + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: operator-image + path: operator-image.tar + e2e: runs-on: ubuntu-latest - needs: build-bink + needs: [build-bink, build-operator] timeout-minutes: 30 permissions: contents: read - packages: write env: IMAGE: ghcr.io/${{ github.repository }} steps: @@ -138,8 +159,13 @@ jobs: - name: Start podman socket run: systemctl --user start podman.socket - - name: Build operator image - run: make buildimg + - name: Download operator image + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 + with: + name: operator-image + + - name: Load operator image + run: podman load -i operator-image.tar - name: Start bink cluster run: make start-bink From 1e2652f98cceb7b30222f785e7c872b5eb05e56b Mon Sep 17 00:00:00 2001 From: Alice Frosi Date: Fri, 3 Jul 2026 13:48:24 +0000 Subject: [PATCH 3/4] ci: push operator image in a separate job 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 --- .github/workflows/ci.yaml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d58c55b..51ad4f6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -111,8 +111,6 @@ jobs: timeout-minutes: 30 permissions: contents: read - env: - IMAGE: ghcr.io/${{ github.repository }} steps: - name: Checkout uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 @@ -188,8 +186,25 @@ jobs: path: _output/logs/ if-no-files-found: ignore + push: + if: github.event_name == 'push' + runs-on: ubuntu-latest + needs: e2e + permissions: + contents: read + packages: write + env: + IMAGE: ghcr.io/${{ github.repository }} + steps: + - name: Download operator image + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 + with: + name: operator-image + + - name: Load operator image + run: podman load -i operator-image.tar + - name: Push to GHCR - if: github.event_name == 'push' env: ACTOR: ${{ github.actor }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From af81a9b536214ac730b6d1163618e317d9784928 Mon Sep 17 00:00:00 2001 From: Alice Frosi Date: Fri, 3 Jul 2026 13:48:55 +0000 Subject: [PATCH 4/4] ci: run e2e tests on multiple k8s versions 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 --- .github/workflows/ci.yaml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 51ad4f6..4c086dd 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -17,6 +17,18 @@ concurrency: cancel-in-progress: true jobs: + supported-versions: + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + steps: + - name: Get supported Kubernetes versions + id: set-matrix + run: | + MATRIX=$(curl -s https://endoflife.date/api/kubernetes.json | \ + jq -c '[.[] | select(.eol > (now | strftime("%Y-%m-%d"))) | .cycle][:3]') + echo "matrix=${MATRIX}" >> "$GITHUB_OUTPUT" + unit: runs-on: ubuntu-latest permissions: @@ -107,10 +119,16 @@ jobs: e2e: runs-on: ubuntu-latest - needs: [build-bink, build-operator] + needs: [build-bink, build-operator, supported-versions] timeout-minutes: 30 permissions: contents: read + strategy: + fail-fast: false + matrix: + kube-minor: ${{ fromJson(needs.supported-versions.outputs.matrix) }} + env: + BINK_NODE_DISK_IMAGE: ghcr.io/bootc-dev/bink/node:v${{ matrix.kube-minor }}-fedora-44-disk steps: - name: Checkout uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 @@ -182,7 +200,7 @@ jobs: if: always() uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: - name: e2e-logs + name: e2e-logs-${{ matrix.kube-minor }} path: _output/logs/ if-no-files-found: ignore