Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(make): Split MENDER_PUBLISH_REGISTRY into registry and repository #61

Merged
merged 1 commit into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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