Skip to content

Commit

Permalink
build(make): Split MENDER_PUBLISH_REGISTRY into registry and repository
Browse files Browse the repository at this point in the history
Signed-off-by: Alf-Rune Siqveland <[email protected]>
  • Loading branch information
alfrunes committed Sep 30, 2024
1 parent 282916e commit e27c770
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions backend/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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)
6 changes: 4 additions & 2 deletions backend/services/Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)"
Expand Down

0 comments on commit e27c770

Please sign in to comment.