66
66
GOBIN =$(shell $(GO ) env GOBIN)
67
67
endif
68
68
69
- ifeq ($(IMAGE_PLATFORM ) ,)
70
- IMAGE_PLATFORM =linux/$(shell $(GO ) env GOARCH)
71
- endif
72
-
73
69
ifeq ($(CLUSTER_DNS ) ,)
74
70
# This makes sure that the "ingresscontroller" kind, which only exists on OpenShift by default, is only queried
75
71
# when CLUSTER_DNS is not set.
@@ -513,7 +509,8 @@ docker/login/internal:
513
509
514
510
# Build the image
515
511
image/build :
516
- DOCKER_CONFIG=${DOCKER_CONFIG} $(DOCKER ) buildx build -t $(SHORT_IMAGE_REF ) . --load
512
+ DOCKER_CONFIG=${DOCKER_CONFIG} $(DOCKER ) build -t $(SHORT_IMAGE_REF ) .
513
+ DOCKER_CONFIG=${DOCKER_CONFIG} $(DOCKER ) tag $(IMAGE_REF ) $(SHORT_IMAGE_REF )
517
514
@echo " New image tag: $( SHORT_IMAGE_REF) . You might want to"
518
515
@echo " export FLEET_MANAGER_IMAGE=$( SHORT_IMAGE_REF) "
519
516
ifeq ("$(CLUSTER_TYPE ) ","kind")
@@ -557,16 +554,11 @@ image/push/emailsender: image/build/emailsender
557
554
@echo " emailsender image was pushed as $( IMAGE_REF) ."
558
555
.PHONY : image/push/emailsender
559
556
560
- # Build and push the image
561
- image/push : image/push/fleet-manager image/push/probe
562
- .PHONY : image/push
563
-
564
557
image/push/fleet-manager : IMAGE_REF="$(external_image_registry ) /$(image_repository ) :$(image_tag ) "
565
- image/push/fleet-manager :
566
- DOCKER_CONFIG=${DOCKER_CONFIG} $(DOCKER ) buildx build -t $(IMAGE_REF ) --platform $( IMAGE_PLATFORM ) --output " type=image,push=true " .
558
+ image/push/fleet-manager : image/build
559
+ DOCKER_CONFIG=${DOCKER_CONFIG} $(DOCKER ) push $(IMAGE_REF )
567
560
@echo
568
- @echo " Image was pushed as $( IMAGE_REF) . You might want to"
569
- @echo " export FLEET_MANAGER_IMAGE=$( IMAGE_REF) "
561
+ @echo " Image was pushed as $( IMAGE_REF) ."
570
562
.PHONY : image/push/fleet-manager
571
563
572
564
image/push/probe : IMAGE_REF="$(external_image_registry ) /$(probe_image_repository ) :$(image_tag ) "
@@ -579,7 +571,7 @@ image/push/probe: image/build/probe
579
571
# push the image to the OpenShift internal registry
580
572
image/push/internal : IMAGE_TAG ?= $(image_tag )
581
573
image/push/internal : docker/login/internal
582
- $(DOCKER ) buildx build -t " $( shell oc get route default-route -n openshift-image-registry -o jsonpath=" {.spec.host}" ) /$( NAMESPACE) /$( IMAGE_NAME) :$( IMAGE_TAG) " --platform linux/amd64 --output " type=registry, push=true " .
574
+ $(DOCKER ) buildx build -t " $( shell oc get route default-route -n openshift-image-registry -o jsonpath=" {.spec.host}" ) /$( NAMESPACE) /$( IMAGE_NAME) :$( IMAGE_TAG) " --platform linux/amd64 --push .
583
575
.PHONY : image/push/internal
584
576
585
577
image/build/fleetshard-operator : IMAGE_REF="$(external_image_registry ) /fleetshard-operator:$(image_tag ) "
0 commit comments