From 63068981c5b6a8c8e43786c53a5c53b97c68f9e2 Mon Sep 17 00:00:00 2001 From: Olivier Michallat Date: Tue, 21 Feb 2023 08:50:33 -0800 Subject: [PATCH] Fix image tag in kuttl multi-versions tests --- .github/workflows/version_tests.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/version_tests.yaml b/.github/workflows/version_tests.yaml index ba5fc7990..3a72da03e 100644 --- a/.github/workflows/version_tests.yaml +++ b/.github/workflows/version_tests.yaml @@ -20,6 +20,8 @@ jobs: build_image: name: Build image runs-on: ubuntu-latest + outputs: + image_tag: ${{ steps.parse_image_tag.outputs.image_tag }} steps: - name: Check out code into the Go module directory uses: actions/checkout@v3 @@ -28,6 +30,9 @@ jobs: ref: ${{ github.event.pull_request.head.sha }} - uses: actions/checkout@v3 if: github.event_name != 'pull_request' + - name: Parse image version + id: parse_image_tag + run: echo "image_tag=$(yq eval '.images[0].newTag' config/deployments/default/kustomization.yaml)" >> $GITHUB_OUTPUT - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 - name: Build Docker image @@ -37,7 +42,7 @@ jobs: file: Dockerfile context: . push: false - tags: k8ssandra/k8ssandra-operator:latest + tags: k8ssandra/k8ssandra-operator:latest,k8ssandra/k8ssandra-operator:${{ steps.parse_image_tag.outputs.image_tag }} platforms: linux/amd64 cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache @@ -98,7 +103,7 @@ jobs: run: | kind create cluster --name k8ssandra-0 --config ./test/kuttl/config/kind/w3k${{ matrix.k8s_version }}.yaml make cert-manager - make IMG="k8ssandra/k8ssandra-operator:latest" kind-load-image + make IMG="k8ssandra/k8ssandra-operator:${{ needs.build_image.outputs.image_tag }}" kind-load-image - name: Run kuttl test run: | # We are running tests against k8s 1.21