forked from kapicorp/kapitan
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
71 lines (59 loc) · 1.71 KB
/
Makefile
File metadata and controls
71 lines (59 loc) · 1.71 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
all: clean package
.PHONY: test
test:
@echo ----- Running python tests -----
python3 -m unittest discover
.PHONY: test_docker
# for local testing, CI/CD uses docker github action for testing/pushing images
test_docker:
@echo ----- Testing build of docker image -----
docker build . --no-cache -t kapitan
@echo ----- Testing run of docker image -----
docker run -ti --rm kapitan --help
docker run -ti --rm kapitan lint
@echo ----- Testing build of docker ci image -----
docker build . --no-cache -t kapitan-ci -f Dockerfile.ci
@echo ----- Testing run of docker ci image -----
docker run -ti --rm kapitan-ci kapitan --help
docker run -ti --rm kapitan-ci kapitan lint
.PHONY: test_coverage
test_coverage:
@echo ----- Testing code coverage -----
coverage run --source=kapitan --omit="*reclass*" -m unittest discover
coverage report --fail-under=65 -m
.PHONY: test_formatting
test_formatting:
@echo ----- Testing code formatting -----
black --check .
@echo
.PHONY: release
release:
ifeq ($(version),)
@echo Please pass version to release e.g. make release version=0.16.5
else
scripts/inc_version.sh $(version)
endif
.PHONY: package
package:
python3 setup.py sdist bdist_wheel
.PHONY: clean
clean:
rm -rf dist/ build/ kapitan.egg-info/ bindist/
.PHONY: format_codestyle
format_codestyle:
which black || echo "Install black with pip3 install --user black"
# ignores line length and reclass
black .
@echo
.PHONY: build_binary
build_binary:
scripts/build-binary.sh
.PHONY: test_binary
test_binary:
python3 -m unittest tests.test_binary
.PHONY: build_helm_binding
build_helm_binding:
bash kapitan/inputs/helm/build.sh
.PHONY: build_helm_fetch_binding
build_helm_fetch_binding:
bash kapitan/dependency_manager/helm/build.sh