@@ -23,31 +23,15 @@ IMG=powervs-cloud-controller-manager
23
23
POWERVS_CLOUD_CONTROLLER_COMMIT? =6256ccf
24
24
TAG? =$(POWERVS_CLOUD_CONTROLLER_COMMIT )
25
25
26
- build-image-linux-amd64 : init-buildx
26
+ build-image : init-buildx
27
27
{ \
28
- set -e ; \
29
- docker buildx build \
30
- --build-arg golang_image=$(GO_CONTAINER_IMAGE) \
31
- --build-arg TARGETPLATFORM=linux/amd64 --build-arg ARCH=amd64 \
32
- --build-arg POWERVS_CLOUD_CONTROLLER_COMMIT=$(POWERVS_CLOUD_CONTROLLER_COMMIT) \
33
- -t $(REGISTRY ) /$(IMG ) :$(TAG ) _linux_amd64 . --load --target centos-base; \
34
- }
35
-
36
- build-image-linux-ppc64le : init-buildx
37
- { \
38
- set -e ; \
39
- docker buildx build \
40
- --build-arg golang_image=$(GO_CONTAINER_IMAGE) \
41
- --build-arg TARGETPLATFORM=linux/ppc64le --build-arg ARCH=ppc64le \
42
- --build-arg POWERVS_CLOUD_CONTROLLER_COMMIT=$(POWERVS_CLOUD_CONTROLLER_COMMIT) \
43
- -t $(REGISTRY ) /$(IMG ) :$(TAG ) _linux_ppc64le . --load --target centos-base; \
44
- }
45
-
46
- build-image-and-push-linux-amd64 : build-image-linux-amd64
47
- docker push $(REGISTRY ) /$(IMG ) :$(TAG ) _linux_amd64
48
-
49
- build-image-and-push-linux-ppc64le : build-image-linux-ppc64le
50
- docker push $(REGISTRY ) /$(IMG ) :$(TAG ) _linux_ppc64le
28
+ set -e ; \
29
+ docker buildx build \
30
+ --platform=linux/amd64,linux/ppc64le --pull \
31
+ --build-arg golang_image=$(GO_CONTAINER_IMAGE ) \
32
+ --build-arg POWERVS_CLOUD_CONTROLLER_COMMIT=$(POWERVS_CLOUD_CONTROLLER_COMMIT ) \
33
+ -t $(REGISTRY ) /$(IMG ) :$(TAG ) . --push --target centos-base; \
34
+ }
51
35
52
36
init-buildx :
53
37
# Ensure we use a builder that can leverage it (the default on linux will not)
@@ -57,8 +41,3 @@ init-buildx:
57
41
# Register gcloud as a Docker credential helper.
58
42
# Required for "docker buildx build --push".
59
43
gcloud auth configure-docker --quiet
60
-
61
-
62
- build-and-push-multi-arch : build-image-and-push-linux-amd64 build-image-and-push-linux-ppc64le
63
- docker manifest create --amend $(REGISTRY ) /$(IMG ) :$(TAG ) $(REGISTRY ) /$(IMG ) :$(TAG ) _linux_amd64 $(REGISTRY ) /$(IMG ) :$(TAG ) _linux_ppc64le
64
- docker manifest push $(REGISTRY ) /$(IMG ) :$(TAG )
0 commit comments