-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
82 lines (57 loc) · 1.95 KB
/
Makefile
File metadata and controls
82 lines (57 loc) · 1.95 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
SHELL=/bin/bash -euo pipefail
guard-%:
@ if [ "${${*}}" = "" ]; then \
echo "Environment variable $* not set"; \
exit 1; \
fi
install: install-node install-python install-hooks
install-python:
poetry install --no-root
install-node:
npm install
install-hooks:
cp scripts/pre-commit .git/hooks/pre-commit
lint:
npm run lint
poetry run flake8 **/*.py
clean:
rm -rf build
rm -rf dist
publish: clean
mkdir -p build
npm run publish 2> /dev/null
serve:
npm run serve
check-licenses:
npm run check-licenses
scripts/check_python_licenses.sh
deploy-proxy:
scripts/deploy_proxy.sh
deploy-spec:
scripts/deploy_spec.sh
format:
poetry run black **/*.py
build-proxy:
scripts/build_proxy.sh
_dist_include="pytest.ini poetry.lock poetry.toml pyproject.toml Makefile build/. tests"
release: clean publish build-proxy
mkdir -p dist
for f in $(_dist_include); do cp -r $$f dist; done
for env in internal-dev internal-qa; do \
cat ecs-proxies-deploy.yml | sed -e 's/{{ SPINE_ENV }}/veit07/g' -e 's/{{ SANDBOX_MODE_ENABLED }}/False/g' > dist/ecs-deploy-$$env.yml; \
done
cat ecs-proxies-deploy.yml | sed -e 's/{{ SPINE_ENV }}/int/g' -e 's/{{ SANDBOX_MODE_ENABLED }}/False/g' > dist/ecs-deploy-int.yml
cat ecs-proxies-deploy.yml | sed -e 's/{{ SPINE_ENV }}/ref/g' -e 's/{{ SANDBOX_MODE_ENABLED }}/False/g' > dist/ecs-deploy-ref.yml
for env in internal-dev-sandbox internal-qa-sandbox sandbox; do \
cp ecs-proxies-deploy-sandbox.yml dist/ecs-deploy-$$env.yml; \
done
for env in prod; do \
cat ecs-proxies-deploy-prod.yml | sed -e 's/{{ SPINE_ENV }}/prod/g' > dist/ecs-deploy-prod.yml; \
done
dist: release
test: smoketest
pytest-guards: guard-SERVICE_BASE_PATH guard-APIGEE_ENVIRONMENT guard-SOURCE_COMMIT_ID guard-STATUS_ENDPOINT_API_KEY
smoketest: pytest-guards
poetry run python -m pytest -v --junitxml=smoketest-report.xml -s -m smoketest
prod-smoketest: pytest-guards
poetry run python -m pytest -v --junitxml=smoketest-report.xml -s -m prodsmoketest