File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 3333 run : make test
3434 - name : Upload code coverage
3535 uses : codecov/codecov-action@v3
36- docker-build :
36+ docker-build :
3737 name : Build Docker images
3838 runs-on : ubuntu-latest
3939 steps :
Original file line number Diff line number Diff line change 1616IMG ?= public.ecr.aws/eks/amazon-network-policy-controller-k8s:v0.5.2
1717# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
1818ENVTEST_K8S_VERSION = 1.26.1
19- # PLATFORMS define the target platforms for the controller image be build
20- PLATFORMS ?= linux/ amd64,linux/ arm64
19+ # ARCHS define the target architectures for the controller image be build
20+ ARCHS ?= amd64 arm64
2121# IMG_SBOM defines the SBOM media type to use, we set to none since ECR doesn't support it yet
2222IMG_SBOM ?= none
2323
@@ -175,7 +175,9 @@ BASE_IMAGE=public.ecr.aws/eks-distro-build-tooling/eks-distro-minimal-base-nonro
175175GO_RUNNER_IMAGE =public.ecr.aws/eks-distro/kubernetes/go-runner:v0.15.0-eks-1-27-3
176176.PHONY : docker-buildx
177177docker-buildx : test
178- docker buildx build --platform=$(PLATFORMS ) -t $(IMG ) -$(GOARCH ) --build-arg BASE_IMAGE=$(BASE_IMAGE ) --build-arg BUILD_IMAGE=$(BUILD_IMAGE ) --build-arg $(GOARCH ) --load .
178+ for platform in $( ARCHS) ; do \
179+ docker buildx build --platform=linux/$$ platform -t $(IMG ) -$$ platform --build-arg BASE_IMAGE=$(BASE_IMAGE ) --build-arg BUILD_IMAGE=$(BUILD_IMAGE ) --build-arg $$ platform --load . ; \
180+ done
179181
180182# Check formatting of source code files without modification.
181183check-format : FORMAT_FLAGS = -l
You can’t perform that action at this time.
0 commit comments