-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
78 lines (58 loc) · 3.17 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
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
UNAME=$(shell uname -m)
ENV_FILE=.env
SERVICE = ""
build:
docker-compose --env-file $(ENV_FILE) -p pipeline --profile core --profile core-service --profile simulation --profile testing build
build-kafka-images:
ifeq ($(UNAME),x86_64)
docker build --no-cache -t acss/kafka-broker:1.0.0 -f external/kafka-docker/Dockerfile external/kafka-docker/
docker build --no-cache -t acss/zookeeper:3.7.0 -f docker/zookeeper.x86_64.Dockerfile .
else
docker build --no-cache -t acss/kafka-broker:1.0.0 -f external/kafka-docker/arm64.Dockerfile external/kafka-docker/
docker build --no-cache -t acss/zookeeper:3.7.0 -f docker/zookeeper.arm64.Dockerfile .
endif
build-service-images:
# docker build -t acss/acss_core:latest -f docker/acss_core.Dockerfile .
# docker build -t acss/core_service:latest -f docker/core_service.Dockerfile .
# docker build -t acss/http_iface:latest -f docker/http_iface.Dockerfile .
# docker build -t acss/service:latest -f docker/service.Dockerfile .
docker build -t acss/test:latest -f docker/test.Dockerfile .
build-base-images:
docker build -t acss/acss-base -f docker/base.Dockerfile .
docker build -t acss/acss-base-server -f docker/base.server.Dockerfile .
build-all: build-kafka-images build-base-images build-service-images build
unit-tests: test-up
docker-compose -p pipeline run --rm --no-deps --entrypoint="/pipe/.venv/bin/python -m pytest tests/unit" test_api
integration-tests: test-up
docker-compose -p pipeline ps
docker-compose -p pipeline run --rm --no-deps --entrypoint="/pipe/.venv/bin/python -m pytest tests/integration" test_api
e2e-tests: test-up
docker-compose -p pipeline run --rm --no-deps --entrypoint="/pipe/.venv/bin/python -m pytest tests/e2e" test_api
e2e-tests-external:
docker-compose --env-file $(ENV_FILE) -p pipeline --profile testing up -d --no-deps
docker-compose --env-file $(ENV_FILE) -p pipeline run --rm --no-deps --entrypoint="/pipe/.venv/bin/python -m pytest tests/e2e/start_up_test.py" test_api
docker-compose --env-file $(ENV_FILE) -p pipeline run --rm --no-deps --entrypoint="/pipe/.venv/bin/python -m pytest tests/integration" test_api
test: test-up
docker-compose --env-file $(ENV_FILE) -p pipeline run --rm --no-deps --entrypoint="/pipe/.venv/bin/python -m pytest tests" test_api
run-test:
docker-compose --env-file $(ENV_FILE) -p pipeline run --rm --no-deps --entrypoint="/pipe/.venv/bin/python -m pytest tests" test_api
test-up: up
docker-compose --env-file $(ENV_FILE) --profile simulation -p pipeline up -d
# Work around: Wait until names of magnets are writte in simulation Database
sleep 10
docker-compose --env-file $(ENV_FILE) --profile testing -p pipeline up -d
docker-compose -p pipeline ps
prod-sim:
docker-compose --env-file $(ENV_FILE) -p pipeline --profile core --profile prod --profile at --profile simulation up -d
docker-compose -p pipeline ps
up:
docker-compose --env-file $(ENV_FILE) --profile core -p pipeline up -d
docker-compose --env-file $(ENV_FILE) --profile core-service -p pipeline up -d
docker-compose -p pipeline ps
down:
docker-compose -p pipeline down --remove-orphans
all-tests: down build test-up
logs:
docker-compose -p pipeline logs $(SERVICE)
restart:
docker-compose -p pipeline restart $(SERVICE)