Skip to content

Commit

Permalink
build(make): Add docker-pull target for pulling images
Browse files Browse the repository at this point in the history
Signed-off-by: Alf-Rune Siqveland <alf.rune@northern.tech>
  • Loading branch information
alfrunes committed Sep 5, 2024
1 parent 1a97891 commit 37f4391
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
10 changes: 10 additions & 0 deletions backend/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ TEST_TARGETS := $(addsuffix -test, $(SERVICES))
TEST_UNIT_TARGETS := $(addsuffix -test-unit, $(SERVICES))
TEST_ACCEPTANCE_TARGETS := $(addsuffix -test-acceptance, $(SERVICES))
DOCKER_TARGETS := $(addsuffix -docker, $(SERVICES))
DOCKER_PULL_TARGETS := $(addsuffix -docker-pull, $(SERVICES))
BUILD_ACCEPTANCE_TARGETS := $(addsuffix -build-acceptance, $(SERVICES))
DOCKER_ACCEPTANCE_TARGETS := $(addsuffix -docker-acceptance, $(SERVICES))

Expand All @@ -20,6 +21,15 @@ $(DOCKER_TARGETS):
MENDER_IMAGE_PREFIX=$(MENDER_IMAGE_PREFIX) \
MENDER_IMAGE_TAG=$(MENDER_IMAGE_TAG)

.PHONY: docker-pull
docker-pull: $(DOCKER_PULL_TARGETS)

.PHONY: $(DOCKER_PULL_TARGETS)
$(DOCKER_PULL_TARGETS):
@$(MAKE) -C services/$(subst -docker-pull,,$@) docker-pull \
MENDER_IMAGE_PREFIX=$(MENDER_IMAGE_PREFIX) \
MENDER_IMAGE_TAG=$(MENDER_IMAGE_TAG)

.PHONY: build
build: $(BUILD_TARGETS)

Expand Down
4 changes: 4 additions & 0 deletions backend/services/Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ docker:
-t $(DOCKER_TAG) \
$(GIT_ROOT)

.PHONY: docker-pull
docker-pull:
docker pull $(DOCKER_TAG)

$(binfile): $(GOFILES)
# TODO: Add -ldflags "-X ...$(Version)"
env CGO_ENABLED=$(CGO_ENABLED) \
Expand Down

0 comments on commit 37f4391

Please sign in to comment.