From 15332e9d20e32974b47db92ba7e50cc1639f198e Mon Sep 17 00:00:00 2001 From: John Sanda Date: Wed, 26 Jan 2022 11:03:30 -0500 Subject: [PATCH] fix image repo name, only build image once --- .github/workflows/kind_e2e_tests.yaml | 12 ++++++++---- .github/workflows/kind_multicluster_e2e_tests.yaml | 4 ++-- .github/workflows/kuttl_tests.yaml | 3 ++- controllers/k8ssandra/k8ssandracluster_controller.go | 2 +- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/kind_e2e_tests.yaml b/.github/workflows/kind_e2e_tests.yaml index 3ff7b113d..123f9ff31 100644 --- a/.github/workflows/kind_e2e_tests.yaml +++ b/.github/workflows/kind_e2e_tests.yaml @@ -19,8 +19,12 @@ jobs: outputs: image: ${{ steps.set_image_var.outputs.image }} steps: - - name: Checkout code - uses: actions/checkout@v2 + - uses: actions/checkout@v2 + if: github.event_name == 'pull_request' + with: + ref: ${{ github.event.pull_request.head.sha }} + - uses: actions/checkout@v2 + if: github.event_name != 'pull_request' - name: Set up Docker buildx uses: docker/setup-buildx-action@v1 - name: Cache Docker layers @@ -33,7 +37,7 @@ jobs: - name: Set build tags id: set_build_tags run: | - image="k8ssandra-operator/k8ssandra-operator:latest" + image="k8ssandra/k8ssandra-operator:latest" echo "build_tags=$image" >> $GITHUB_ENV echo "image=$image" >> $GITHUB_ENV - name: Update build tags @@ -126,7 +130,7 @@ jobs: run: | docker load --input /tmp/k8ssandra-operator.tar - name: Setup kind cluster - run: make IMG=${{ needs.build_image.outputs.image }} e2e-setup-single + run: make IMG=${{ needs.build_image.outputs.image }} create-kind-cluster kind-load-image - name: Run e2e test ( ${{ matrix.e2e_test }} ) run: make E2E_TEST=TestOperator/${{ matrix.e2e_test }} e2e-test - name: Archive k8s logs diff --git a/.github/workflows/kind_multicluster_e2e_tests.yaml b/.github/workflows/kind_multicluster_e2e_tests.yaml index a545ba0a8..963a59ecf 100644 --- a/.github/workflows/kind_multicluster_e2e_tests.yaml +++ b/.github/workflows/kind_multicluster_e2e_tests.yaml @@ -33,7 +33,7 @@ jobs: - name: Set build tags id: set_build_tags run: | - image="k8ssandra-operator/k8ssandra-operator:latest" + image="k8ssandra/k8ssandra-operator:latest" echo "build_tags=$image" >> $GITHUB_ENV echo "image=$image" >> $GITHUB_ENV - name: Update build tags @@ -129,7 +129,7 @@ jobs: run: | docker load --input /tmp/k8ssandra-operator.tar - name: Setup kind clusters - run: make IMG=${{ needs.build_image.outputs.image }} e2e-setup-multi + run: make IMG=${{ needs.build_image.outputs.image }} create-kind-multicluster kind-load-image-multi - name: Run e2e test ( ${{ matrix.e2e_test }} ) run: make E2E_TEST=TestOperator/${{ matrix.e2e_test }} NODETOOL_STATUS_TIMEOUT=2m e2e-test - name: Archive k8s logs diff --git a/.github/workflows/kuttl_tests.yaml b/.github/workflows/kuttl_tests.yaml index 377af7f02..619739376 100644 --- a/.github/workflows/kuttl_tests.yaml +++ b/.github/workflows/kuttl_tests.yaml @@ -12,6 +12,7 @@ on: paths-ignore: - 'docs/**' - 'CHANGELOG/**' + jobs: build_image: name: Build image @@ -33,7 +34,7 @@ jobs: - name: Set build tags id: set_build_tags run: | - image="k8ssandra-operator/k8ssandra-operator:latest" + image="k8ssandra/k8ssandra-operator:latest" echo "build_tags=$image" >> $GITHUB_ENV echo "image=$image" >> $GITHUB_ENV - name: Update build tags diff --git a/controllers/k8ssandra/k8ssandracluster_controller.go b/controllers/k8ssandra/k8ssandracluster_controller.go index 455ea7273..78f4464f8 100644 --- a/controllers/k8ssandra/k8ssandracluster_controller.go +++ b/controllers/k8ssandra/k8ssandracluster_controller.go @@ -136,7 +136,7 @@ func (r *K8ssandraClusterReconciler) reconcile(ctx context.Context, kc *api.K8ss actualDcs = dcs } - kcLogger.Info("All dcs reconciled") + kcLogger.Info("All DCs reconciled") if recResult := r.afterCassandraReconciled(ctx, kc, actualDcs, kcLogger); recResult.Completed() { return recResult.Output()