-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
102 lines (79 loc) · 2.43 KB
/
Makefile
File metadata and controls
102 lines (79 loc) · 2.43 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
SHELL := /bin/bash
########################################################################################################################
##
## Makefile for managing sync async
##
########################################################################################################################
compose_files = ${COMPOSE_FILES}
pwd := ${PWD}
dirname := $(notdir $(patsubst %/,%,$(CURDIR)))
features = features
proxies :=live
modules :=async-slowapp
list:
@grep '^[^#[:space:]].*:' Makefile
guard-%:
@ if [ "${${*}}" = "" ]; then \
echo "Environment variable $* not set"; \
exit 1; \
fi
clean: clean-build clean-dist clean-reports
rm -rf ./build || true
@for dir in $(modules); do \
make --no-print-directory -C docker/$${dir} clean & \
done; \
wait
install-python:
poetry install
install: install-python
@for dir in $(modules); do \
make --no-print-directory -C docker/$${dir} install & \
done; \
wait
update:
@for dir in $(modules); do \
make --no-print-directory -C docker/$${dir} update & \
done; \
wait
reinstall: clean install
clean-build:
rm -rf ./build || true
clean-dist:
rm -rf ./dist || true
clean-reports:
rm -rf ./reports || true
build: clean-build
@for dir in $(modules); do \
make --no-print-directory -C docker/$${dir} build & \
done; \
for dir in $(proxies); do \
make --no-print-directory -C proxies/$${dir} build & \
done; \
wait
build-proxy: build
_dist_include="pytest.ini poetry.lock poetry.toml pyproject.toml Makefile build/. e2e"
dist: clean-dist build
mkdir -p dist
for f in $(_dist_include); do cp -r $$f dist; done
cp ecs-proxies-deploy.yml dist/ecs-deploy-all.yml
test: clean-reports
@for dir in $(modules); do \
make --no-print-directory -C docker/$${dir} test;\
done;
test-report: clean-reports
@for dir in $(modules); do \
make --no-print-directory -C docker/$${dir} test-report; \
done;
hadolint:
@echo "hadolint --config=docker/hadolint.yml docker/*/Dockerfile"
@# The pipe swallows return code, so no need for "|| true".
@docker run --rm -i -v ${PWD}/docker:/docker:ro hadolint/hadolint hadolint --config=docker/hadolint.yml docker/*/Dockerfile | sed 's/:\([0-9]\+\) /:\1:0 /'
shellcheck:
@# Only swallow checking errors (rc=1), not fatal problems (rc=2)
docker run --rm -i -v ${PWD}:/mnt:ro koalaman/shellcheck -f gcc -e SC1090,SC1091 `find * -prune -o -name '*.sh' -print` || test $$? -eq 1
lint: hadolint
pass:
@echo ""
check-licenses: pass
publish: pass
release: dist