From 423d422d49050656bd86ad94caf926eb2efb4830 Mon Sep 17 00:00:00 2001 From: "igor.grzankowski" <@splunk.com> Date: Mon, 17 Feb 2025 17:42:27 +0100 Subject: [PATCH 1/2] Fix distroless workflow. --- .github/workflows/distroless-build-test-push-workflow.yml | 6 +++++- .github/workflows/distroless-int-test-workflow.yml | 2 +- .github/workflows/merge-develop-to-main-workflow.yml | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/distroless-build-test-push-workflow.yml b/.github/workflows/distroless-build-test-push-workflow.yml index f21e0550e..53b0898a2 100644 --- a/.github/workflows/distroless-build-test-push-workflow.yml +++ b/.github/workflows/distroless-build-test-push-workflow.yml @@ -94,7 +94,11 @@ jobs: uses: aws-actions/amazon-ecr-login@v1 - name: Build and push Splunk Operator Image run: | - make docker-buildx IMG=${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA-distroless + export PLATFORMS=linux/arm64,linux/amd64 + export BASE_IMAGE=gcr.io/distroless/static-debian12 + export BASE_IMAGE_VERSION=latest + export IMG=${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA + make docker-buildx PLATFORMS=$PLATFORMS BASE_IMAGE=$BASE_IMAGE BASE_IMAGE_VERSION=$BASE_IMAGE_VERSION IMG=$IMG - name: Sign Splunk Operator image with a key run: | cosign sign --yes --key env://COSIGN_PRIVATE_KEY ${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:${{ github.sha }}-distroless diff --git a/.github/workflows/distroless-int-test-workflow.yml b/.github/workflows/distroless-int-test-workflow.yml index e6031491e..0747690b5 100644 --- a/.github/workflows/distroless-int-test-workflow.yml +++ b/.github/workflows/distroless-int-test-workflow.yml @@ -46,7 +46,7 @@ jobs: export PLATFORMS=linux/arm64,linux/amd64 export BASE_IMAGE=gcr.io/distroless/static-debian12 export BASE_IMAGE_VERSION=latest - export IMG=${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA-distroless + export IMG=${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA make docker-buildx PLATFORMS=$PLATFORMS BASE_IMAGE=$BASE_IMAGE BASE_IMAGE_VERSION=$BASE_IMAGE_VERSION IMG=$IMG int-tests: strategy: diff --git a/.github/workflows/merge-develop-to-main-workflow.yml b/.github/workflows/merge-develop-to-main-workflow.yml index da115f0e9..158421c90 100644 --- a/.github/workflows/merge-develop-to-main-workflow.yml +++ b/.github/workflows/merge-develop-to-main-workflow.yml @@ -95,7 +95,7 @@ jobs: # Build and push Distroless image - name: Build Distroless Image run: | - make docker-build IMG=splunk/splunk-operator-rc:${{ github.event.inputs.release_version }}-distroless-RC${{ github.event.inputs.release_candiate_version }} BASE_IMAGE=gcr.io/distroless/static BASE_IMAGE_VERSION=latest + make docker-buildx IMG=splunk/splunk-operator-rc:${{ github.event.inputs.release_version }}-distroless-RC${{ github.event.inputs.release_candiate_version }} BASE_IMAGE=gcr.io/distroless/static BASE_IMAGE_VERSION=latest - name: Push Distroless Image run: | From a23c5b0c9cf57a80c4b94aa856adb990f83fd897 Mon Sep 17 00:00:00 2001 From: "igor.grzankowski" <@splunk.com> Date: Mon, 17 Feb 2025 18:24:29 +0100 Subject: [PATCH 2/2] fix --- .github/workflows/distroless-int-test-workflow.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/distroless-int-test-workflow.yml b/.github/workflows/distroless-int-test-workflow.yml index 0747690b5..b26f5ce14 100644 --- a/.github/workflows/distroless-int-test-workflow.yml +++ b/.github/workflows/distroless-int-test-workflow.yml @@ -46,8 +46,7 @@ jobs: export PLATFORMS=linux/arm64,linux/amd64 export BASE_IMAGE=gcr.io/distroless/static-debian12 export BASE_IMAGE_VERSION=latest - export IMG=${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA - make docker-buildx PLATFORMS=$PLATFORMS BASE_IMAGE=$BASE_IMAGE BASE_IMAGE_VERSION=$BASE_IMAGE_VERSION IMG=$IMG + make docker-buildx PLATFORMS=$PLATFORMS BASE_IMAGE=$BASE_IMAGE BASE_IMAGE_VERSION=$BASE_IMAGE_VERSION IMG=${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA-distroless int-tests: strategy: fail-fast: false