-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
52 lines (41 loc) · 1.53 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
all: test build basedocker docker verify
SPECTACLE = spectacle
NPM = npm
config:
@echo "---- Configuring Python env ----"
@make --directory ./backend config
@echo "---- Installing tool for documentation generation ----"
@$(NPM) install -g spectacle
test:
@echo "---- Testing Python backend ---- "
@make --directory ./backend test
build:
@echo "---- Packaging Python backend ---- "
@make --directory ./backend build
@echo "---- Packaging JS frontend ---- "
@make --directory ./frontend build
basedocker:
@echo "---- Building base Docker image ----"
@docker build -t emkor/audiopyle-base:latest -f ./scripts/Dockerfile_base ./scripts
docker:
@echo "---- Building app Docker images ----"
make --directory ./backend docker
make --directory ./frontend docker
docs:
@echo "---- Generating static OpenAPI documentation using spectacle ---- "
@mkdir -p ./spectacle_docs
@$(SPECTACLE) --target-dir ./spectacle_docs ./open_api_docs.yml
run:
@echo "---- Running Audiopyle app ----"
@docker-compose -f ./scripts/docker-compose.yml up
verify:
@echo "---- Running integration tests ----"
@docker-compose -f ./scripts/docker-compose-ci.yml up --no-build --abort-on-container-exit --timeout 30 --exit-code-from testcases
cleanup:
@echo "---- Cleaning up Audiopyle app ----"
@make --directory ./backend cleanup
@make --directory ./frontend cleanup
@rm -rf ./spectacle_docs
@docker-compose -f ./scripts/docker-compose.yml down
@docker-compose -f ./scripts/docker-compose-ci.yml down
.PHONY: all config test docs build basedocker docker run verify