-
Notifications
You must be signed in to change notification settings - Fork 92
/
Makefile
49 lines (35 loc) · 1.19 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
HTMLCOV_DIR ?= htmlcov
TAG ?= dev
IMAGES := orders products gateway
install-dependencies:
pip install -U -e "orders/.[dev]"
pip install -U -e "products/.[dev]"
pip install -U -e "gateway/.[dev]"
# test
coverage-html:
coverage html -d $(HTMLCOV_DIR) --fail-under 100
coverage-report:
coverage report -m
test:
flake8 orders products gateway
coverage run -m pytest gateway/test $(ARGS)
coverage run --append -m pytest orders/test $(ARGS)
coverage run --append -m pytest products/test $(ARGS)
coverage: test coverage-report coverage-html
# docker
build-base:
docker build --target base -t nameko-example-base .;
docker build --target builder -t nameko-example-builder .;
build: build-base
for image in $(IMAGES) ; do TAG=$(TAG) make -C $$image build-image; done
docker-save:
mkdir -p docker-images
docker save -o docker-images/examples.tar $(foreach image,$(IMAGES),nameko/nameko-example-$(image):$(TAG))
docker-load:
docker load -i docker-images/examples.tar
docker-tag:
for image in $(IMAGES) ; do make -C $$image docker-tag; done
docker-login:
docker login --password=$(DOCKER_PASSWORD) --username=$(DOCKER_USERNAME)
push-images:
for image in $(IMAGES) ; do make -C $$image push-image; done