From e27c77001704218b36442641598e3b3d1ef65fd1 Mon Sep 17 00:00:00 2001 From: Alf-Rune Siqveland Date: Mon, 30 Sep 2024 10:56:42 +0200 Subject: [PATCH] build(make): Split MENDER_PUBLISH_REGISTRY into registry and repository Signed-off-by: Alf-Rune Siqveland --- backend/Makefile | 6 ++++++ backend/services/Makefile.common | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/backend/Makefile b/backend/Makefile index d357041c..a5dfe81f 100644 --- a/backend/Makefile +++ b/backend/Makefile @@ -2,6 +2,10 @@ MENDER_IMAGE_PREFIX ?= localhost:5000/mender-server MENDER_IMAGE_TAG ?= latest MENDER_IMAGE_TAG_TEST ?= test +MENDER_PUBLISH_REGISTRY ?= docker.io +MENDER_PUBLISH_REPOSTIORY ?= $(MENDER_PUBLISH_REGISTRY)/mendersoftware +MENDER_PUBLISH_TAG ?= $(MENDER_IMAGE_TAG) + SERVICES = $(subst services,,$(subst /,,$(wildcard services/*/))) BUILD_TARGETS := $(addsuffix -build, $(SERVICES)) TEST_TARGETS := $(addsuffix -test, $(SERVICES)) @@ -94,4 +98,6 @@ $(DOCKER_PUBLISH_TARGETS): @$(MAKE) -C services/$(subst -docker-publish,,$@) docker-publish \ MENDER_IMAGE_PREFIX=$(MENDER_IMAGE_PREFIX) \ MENDER_IMAGE_TAG=$(MENDER_IMAGE_TAG) \ + MENDER_PUBLISH_REGISTRY=$(MENDER_PUBLISH_REGISTRY) \ + MENDER_PUBLISH_REPOSTIORY=$(MENDER_PUBLISH_REPOSTIORY) \ MENDER_PUBLISH_TAG=$(MENDER_PUBLISH_TAG) diff --git a/backend/services/Makefile.common b/backend/services/Makefile.common index c864a8e5..2466d5c6 100644 --- a/backend/services/Makefile.common +++ b/backend/services/Makefile.common @@ -3,8 +3,10 @@ MENDER_IMAGE_PREFIX ?= localhost:5000/mender-server MENDER_IMAGE_TAG ?= latest MENDER_IMAGE_TAG_TEST ?= test + +MENDER_PUBLISH_REGISTRY ?= docker.io +MENDER_PUBLISH_REPOSITORY ?= $(MENDER_PUBLISH_REGISTRY)/mendersoftware MENDER_PUBLISH_TAG ?= $(MENDER_IMAGE_TAG) -MENDER_PUBLISH_REGISTRY := docker.io/mendersoftware bindir ?= $(GIT_ROOT)/bin binfile ?= $(bindir)/$(COMPONENT) @@ -60,7 +62,7 @@ docker-pull: docker pull $(DOCKER_TAG) .PHONY: docker-publish -docker-publish: DOCKER_TAG_PUBLISH = $(MENDER_PUBLISH_REGISTRY)/$(COMPONENT):$(MENDER_PUBLISH_TAG) +docker-publish: DOCKER_TAG_PUBLISH = $(MENDER_PUBLISH_REPOSITORY)/$(COMPONENT):$(MENDER_PUBLISH_TAG) ifndef NOASK docker-publish: echo "About to publish $(DOCKER_TAG) to $(DOCKER_TAG_PUBLISH)"