forked from mozilla-services/socorro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
79 lines (54 loc) · 1.63 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
79
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
.PHONY: all test bootstrap install lint clean breakpad json_enhancements_pg_extension package
all: test
test: bootstrap
./scripts/test.sh
dev:
SOCORRO_DEVELOPMENT_ENV=1 ./scripts/bootstrap.sh
bootstrap:
./scripts/bootstrap.sh
install: bootstrap
./scripts/install.sh
package: install
./scripts/package.sh
lint:
./scripts/lint.sh
clean:
./scripts/clean.sh
breakpad:
PREFIX=`pwd`/stackwalk/ SKIP_TAR=1 ./scripts/build-breakpad.sh
# Docker related rules
.PHONY: dockerbuild dockersetup dockerclean dockertest dockertestshell dockerrun
DC := $(shell which docker-compose)
my.env:
@if [ ! -f my.env ]; \
then \
echo "Copying my.env.dist to my.env..."; \
cp docker/config/my.env.dist my.env; \
fi
.docker-build:
make dockerbuild
dockerbuild: my.env
${DC} build base
${DC} build processor webapp crontabber docs
touch .docker-build
# NOTE(willkg): We run setup in the webapp container because the webapp will own
# postgres going forward and has the needed environment variables.
dockersetup: my.env .docker-build
${DC} run webapp /app/docker/run_setup_postgres.sh
dockerclean:
rm .docker-build
dockertest: my.env
./docker/run_tests_in_docker.sh ${ARGS}
dockertestshell: my.env
./docker/run_tests_in_docker.sh --shell
dockerdocs: my.env
./docker/as_me.sh --container docs ./docker/run_build_docs.sh
dockerupdatedata: my.env
./docker/run_update_data.sh
dockerrun: my.env
${DC} up webapp processor
dockerstop: my.env
${DC} stop