-
Notifications
You must be signed in to change notification settings - Fork 53
/
Makefile
29 lines (20 loc) · 1.07 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# 'make' will build docker images and try to run it.
default: update-props build-stable up-test-mode
.PHONY: update-props update-props-blue update-props-green update-props-dryrun build-confd
CONFD_DOCKER_COMMAND := docker run --rm -v $(shell pwd):$(shell pwd) -w $(shell pwd) -u $(shell id -u):$(shell id -g) -e HOSTNAME=$(shell hostname) kilda/confd
UPDATE_PROPS := $(CONFD_DOCKER_COMMAND) confd -onetime -confdir ./confd/ -backend file -file ./confd/vars/main.yaml -file ./confd/vars/docker-compose.yaml -file ./confd/vars/test-vars.yaml -sync-only
KILDA_CONFD_IMAGE=$(shell docker images --filter=reference="kilda/confd" --format="{{.Repository}}")
ifneq "$(KILDA_CONFD_IMAGE)" "kilda/confd"
build-confd:
docker build -t kilda/confd:latest docker/confd
BUILD_CONFD= build-confd
else
BUILD_CONFD=
endif
generated.mk update-props update-props-blue: $(BUILD_CONFD)
$(UPDATE_PROPS) -file ./confd/vars/blue-mode.yaml
update-props-green: $(BUILD_CONFD)
$(UPDATE_PROPS) -file ./confd/vars/green-mode.yaml
update-props-dryrun: $(BUILD_CONFD)
$(UPDATE_PROPS) -noop
include generated.mk