-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (35 loc) · 1.26 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
.EXPORT_ALL_VARIABLES:
TAG := $(shell grep ^__version__ router.py | cut -d\' -f 2)
all: clean lint build test
build:
docker compose --progress=quiet build router
docker compose --progress=quiet run --no-deps --rm router pip freeze > requirements.txt
changelog:
PYTHONPATH=. gitchangelog > CHANGELOG.md
clean:
docker compose down -t 0
find . -name __pycache__ -type d -exec rm -rf {} \; -depth
cleanall: clean
docker system prune --all --force --volumes
github: clean lint build test-github
lint:
docker run --quiet --rm -i hadolint/hadolint < Dockerfile
isort -v .
flake8
non-system-tests:
LOG_LEVEL=DEBUG PYTHONPATH=.:.. pytest -m 'not system'
tag:
@echo ${TAG}
test:
docker compose --progress=quiet up -d --wait
LOG_LEVEL=DEBUG PYTHONPATH=.:.. pytest
test-github:
docker compose --progress=quiet up -d --wait router
LOG_LEVEL=DEBUG PYTHONPATH=.:.. pytest
trivy:
trivy image --severity HIGH,CRITICAL --ignore-unfixed router:latest
update-pip-requirements:
pip freeze > /tmp/requirements.txt
comm -23 /tmp/requirements.txt ./requirements.txt > requirements-dev.txt
update-trivy-ignore:
trivy image --format json --ignore-unfixed --severity HIGH,CRITICAL router:latest | jq -r '.Results[1].Vulnerabilities[].VulnerabilityID' | sort -u | tee .trivyignore