docker: Fix aarch64 mysql docker build/push skip 02/1702/2
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Wed, 2 Oct 2019 12:25:41 +0000 (14:25 +0200)
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Wed, 2 Oct 2019 13:10:42 +0000 (15:10 +0200)
The previous attempt of skipping the mysql container image build on
aarch64 did not really work.

Rework our .push_image by adding a wrapper make target, push-image,
for each docker container.

Fixes: ffc875998692929c2e4c0881aec6b68c9f2fbab8

Change-Id: I1fe2d0ad05fda224db1991d07f46653f89b5a82b
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
12 files changed:
docker/Makefile
docker/build.mk
docker/docker/Makefile
docker/hardware/Makefile
docker/helm/Makefile
docker/k8s/Makefile
docker/kube-conformance/Makefile
docker/mysql/Makefile
docker/openstack/Makefile
docker/os/Makefile
docker/sonobuoy-plugin-systemd-logs/Makefile
docker/ui/Makefile

index 707dbc8..1f1c461 100644 (file)
@@ -38,6 +38,6 @@ $(SUBDIRS_BUILD):
 
 .PHONY: $(SUBDIRS_PUSH)
 $(SUBDIRS_PUSH):
-       $(MAKE) -C $(@:-push=) .push_image
+       $(MAKE) -C $(@:-push=) push-image
 
 include build.mk
index 4536563..2f7d398 100644 (file)
@@ -54,7 +54,7 @@ $(MTOOL):
                .
 
 .PHONY: .push_image
-.push_image:: .build
+.push_image: .build
        docker push $(REGISTRY)/$(NAME):$(TAG_PRE)-$(HOST_ARCH)-$(TAG_VER)
 
 .PHONY: .push_manifest
index a5b4099..4d43df8 100644 (file)
 ##############################################################################
 
 .PHONY: all
-all: .push_image .push_manifest
+all: push-image .push_manifest
 
 .PHONY: build
 build: .build
 
+.PHONY: push-image
+push-image: .push_image
+
 include ../build.mk
index a5b4099..4d43df8 100644 (file)
 ##############################################################################
 
 .PHONY: all
-all: .push_image .push_manifest
+all: push-image .push_manifest
 
 .PHONY: build
 build: .build
 
+.PHONY: push-image
+push-image: .push_image
+
 include ../build.mk
index a5b4099..4d43df8 100644 (file)
 ##############################################################################
 
 .PHONY: all
-all: .push_image .push_manifest
+all: push-image .push_manifest
 
 .PHONY: build
 build: .build
 
+.PHONY: push-image
+push-image: .push_image
+
 include ../build.mk
index a5b4099..4d43df8 100644 (file)
 ##############################################################################
 
 .PHONY: all
-all: .push_image .push_manifest
+all: push-image .push_manifest
 
 .PHONY: build
 build: .build
 
+.PHONY: push-image
+push-image: .push_image
+
 include ../build.mk
index c1dd0af..ee7b40f 100644 (file)
@@ -23,9 +23,12 @@ export TAG_VER?=v$(KUBE_VERSION)
        $(MAKE) -C $(TAG_PRE) e2e.test kubectl ginkgo
 
 .PHONY: all
-all: .push_image .push_manifest
+all: push-image .push_manifest
 
 .PHONY: build
 build: .build
 
+.PHONY: push-image
+push-image: .push_image
+
 include ../build.mk
index e45aa7d..c1f627f 100644 (file)
 ##############################################################################
 
 .PHONY: all
-all: .push_image .push_manifest
+all: push-image .push_manifest
 
 # MySQL 5.6 is not supported on arm64 yet, skip building it for now
-ifeq ($(shell uname -m), aarch64)
-.PHONY: .build
-.build::
+.PHONY: build push-image
+ifneq ($(shell uname -m), aarch64)
+build: .build
+push-image: .push_image
+else
+build:
        echo "Skipping build on aarch64 platform!"
        exit 0
-.PHONY: .push_image
-.push_image::
+push-image:
        echo "Skipping push on aarch64 platform!"
        exit 0
 endif
 
-.PHONY: build
-build: .build
-
 include ../build.mk
index a5b4099..4d43df8 100644 (file)
 ##############################################################################
 
 .PHONY: all
-all: .push_image .push_manifest
+all: push-image .push_manifest
 
 .PHONY: build
 build: .build
 
+.PHONY: push-image
+push-image: .push_image
+
 include ../build.mk
index a5b4099..4d43df8 100644 (file)
 ##############################################################################
 
 .PHONY: all
-all: .push_image .push_manifest
+all: push-image .push_manifest
 
 .PHONY: build
 build: .build
 
+.PHONY: push-image
+push-image: .push_image
+
 include ../build.mk
index d06875d..0af457a 100644 (file)
@@ -20,9 +20,12 @@ export WORK_DIR?=$(TAG_PRE)
 .build:: .submodules_patched
 
 .PHONY: all
-all: .push_image .push_manifest
+all: push-image .push_manifest
 
 .PHONY: build
 build: .build
 
+.PHONY: push-image
+push-image: .push_image
+
 include ../build.mk
index db91c1e..918a164 100644 (file)
 ##############################################################################
 
 .PHONY: all
-all: .push_image .push_manifest
+all: push-image .push_manifest
 
 .PHONY: build
 build: .build
 
+.PHONY: push-image
+push-image: .push_image
+
 include ../build.mk