forked from nameko/nameko-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
41 lines (27 loc) · 1.01 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
HTMLCOV_DIR ?= htmlcov
IMAGES := orders products gateway
# 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-example-base:
docker build -t nameko-example-base -f docker/docker.base .;
build-wheel-builder: build-example-base
docker build -t nameko-example-builder -f docker/docker.build .;
run-wheel-builder: build-wheel-builder
for image in $(IMAGES) ; do make -C $$image run-wheel-builder; done
build-images: run-wheel-builder
for image in $(IMAGES) ; do make -C $$image build-image; done
build: build-images
docker-login:
@docker login --email=$(DOCKER_EMAIL) --password=$(DOCKER_PASSWORD) --username=$(DOCKER_USERNAME)
push-images: build
for image in $(IMAGES) ; do make -C $$image push-image; done