From: Alexandru Avadanii Date: Wed, 2 Oct 2019 12:25:41 +0000 (+0200) Subject: docker: Fix aarch64 mysql docker build/push skip X-Git-Tag: 2.0.0~26 X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=commitdiff_plain;h=96befacc890c4386d305678801d9ddd2f849a1da;p=validation.git docker: Fix aarch64 mysql docker build/push skip 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 --- diff --git a/docker/Makefile b/docker/Makefile index 707dbc8..1f1c461 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -38,6 +38,6 @@ $(SUBDIRS_BUILD): .PHONY: $(SUBDIRS_PUSH) $(SUBDIRS_PUSH): - $(MAKE) -C $(@:-push=) .push_image + $(MAKE) -C $(@:-push=) push-image include build.mk diff --git a/docker/build.mk b/docker/build.mk index 4536563..2f7d398 100644 --- a/docker/build.mk +++ b/docker/build.mk @@ -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 diff --git a/docker/docker/Makefile b/docker/docker/Makefile index a5b4099..4d43df8 100644 --- a/docker/docker/Makefile +++ b/docker/docker/Makefile @@ -15,9 +15,12 @@ ############################################################################## .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 diff --git a/docker/hardware/Makefile b/docker/hardware/Makefile index a5b4099..4d43df8 100644 --- a/docker/hardware/Makefile +++ b/docker/hardware/Makefile @@ -15,9 +15,12 @@ ############################################################################## .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 diff --git a/docker/helm/Makefile b/docker/helm/Makefile index a5b4099..4d43df8 100644 --- a/docker/helm/Makefile +++ b/docker/helm/Makefile @@ -15,9 +15,12 @@ ############################################################################## .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 diff --git a/docker/k8s/Makefile b/docker/k8s/Makefile index a5b4099..4d43df8 100644 --- a/docker/k8s/Makefile +++ b/docker/k8s/Makefile @@ -15,9 +15,12 @@ ############################################################################## .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 diff --git a/docker/kube-conformance/Makefile b/docker/kube-conformance/Makefile index c1dd0af..ee7b40f 100644 --- a/docker/kube-conformance/Makefile +++ b/docker/kube-conformance/Makefile @@ -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 diff --git a/docker/mysql/Makefile b/docker/mysql/Makefile index e45aa7d..c1f627f 100644 --- a/docker/mysql/Makefile +++ b/docker/mysql/Makefile @@ -15,21 +15,20 @@ ############################################################################## .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 diff --git a/docker/openstack/Makefile b/docker/openstack/Makefile index a5b4099..4d43df8 100644 --- a/docker/openstack/Makefile +++ b/docker/openstack/Makefile @@ -15,9 +15,12 @@ ############################################################################## .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 diff --git a/docker/os/Makefile b/docker/os/Makefile index a5b4099..4d43df8 100644 --- a/docker/os/Makefile +++ b/docker/os/Makefile @@ -15,9 +15,12 @@ ############################################################################## .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 diff --git a/docker/sonobuoy-plugin-systemd-logs/Makefile b/docker/sonobuoy-plugin-systemd-logs/Makefile index d06875d..0af457a 100644 --- a/docker/sonobuoy-plugin-systemd-logs/Makefile +++ b/docker/sonobuoy-plugin-systemd-logs/Makefile @@ -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 diff --git a/docker/ui/Makefile b/docker/ui/Makefile index db91c1e..918a164 100644 --- a/docker/ui/Makefile +++ b/docker/ui/Makefile @@ -15,9 +15,12 @@ ############################################################################## .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