diff --git a/.github/workflows/build-test-push-workflow.yml b/.github/workflows/build-test-push-workflow.yml index 783067688..dab0c9569 100644 --- a/.github/workflows/build-test-push-workflow.yml +++ b/.github/workflows/build-test-push-workflow.yml @@ -332,7 +332,6 @@ jobs: uses: aws-actions/amazon-ecr-login@v1 - name: Re-tag Splunk Operator Image run: | - docker pull ${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA - docker buildx imagetools create -t ${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:${{ env.TAG }} ${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA + docker tag ${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA ${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:${{ env.TAG }} - name: Push Splunk Operator Image to Docker Hub run: docker push ${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:${{ env.TAG }} \ No newline at end of file diff --git a/.github/workflows/int-test-workflow.yml b/.github/workflows/int-test-workflow.yml index 0c47475f1..e4b36cea1 100644 --- a/.github/workflows/int-test-workflow.yml +++ b/.github/workflows/int-test-workflow.yml @@ -154,8 +154,7 @@ jobs: uses: aws-actions/amazon-ecr-login@v1 - name: Pull Splunk Operator Image Locally and change name run: | - docker pull ${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA - docker buildx imagetools create -t ${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA ${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA + docker tag ${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA ${{ env.SPLUNK_OPERATOR_IMAGE_NAME }}:$GITHUB_SHA - name: Tag and Push Splunk Enterprise Image to ECR run: | docker tag ${{ env.SPLUNK_ENTERPRISE_IMAGE }} ${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_ENTERPRISE_IMAGE }} diff --git a/Dockerfile b/Dockerfile index 3eb5f4d81..91901977b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,7 +27,7 @@ COPY hack hack/ RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -a -o manager main.go # Use BASE_OS as the base image -FROM ${BASE_OS}:{BASE_OS_VERSION} +FROM ${BASE_OS}:${BASE_OS_VERSION} ENV OPERATOR=/manager \ USER_UID=1001 \ diff --git a/Makefile b/Makefile index e5d6de230..bc57ee39d 100644 --- a/Makefile +++ b/Makefile @@ -150,14 +150,21 @@ docker-push: ## Push docker image with the manager. # Build Base OS: registry.access.redhat.com/ubi8/ubi # Build Base OS Version: 8.10 # Pass only what is required, the rest will be defaulted -docker-buildx: - docker buildx build --push --platform=${PLATFORMS} \ - --build-arg BASE_OS=${BASE_OS} \ - --build-arg BASE_OS_VERSION=${BASE_OS_VERSION} \ - --tag ${IMG} -f Dockerfile . +# Setup defaults for build arguments +PLATFORMS ?= linux/amd64 +BASE_OS ?= registry.access.redhat.com/ubi8/ubi +BASE_OS_VERSION ?= 8.10 +docker-buildx: + @if [ -z "$(IMG)" ]; then \ + echo "Error: IMG is a mandatory argument. Usage: make docker-buildx IMG= ...."; \ + exit 1; \ + fi + docker buildx build --push --platform="${PLATFORMS}" \ + --build-arg BASE_OS="${BASE_OS}" \ + --build-arg BASE_OS_VERSION="${BASE_OS_VERSION}" \ + --tag "${IMG}" -f Dockerfile . ##@ Deployment - install: manifests kustomize ## Install CRDs into the K8s cluster specified in ~/.kube/config. $(KUSTOMIZE) build config/crd | kubectl apply --server-side --force-conflicts -f - diff --git a/test/testenv/verificationutils.go b/test/testenv/verificationutils.go index 8ff179919..e62d6e5b9 100644 --- a/test/testenv/verificationutils.go +++ b/test/testenv/verificationutils.go @@ -94,7 +94,6 @@ func StandaloneReady(ctx context.Context, deployment *Deployment, deploymentName } testenvInstance.Log.Info("Waiting for Standalone phase to be ready", "instance", standalone.ObjectMeta.Name, "Phase", standalone.Status.Phase) DumpGetPods(testenvInstance.GetName()) - //DumpDescribePods(testenvInstance.GetName()) DumpGetTopPods(testenvInstance.GetName()) DumpGetTopNodes() return standalone.Status.Phase