This repository was archived by the owner on Aug 14, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
56 lines (41 loc) · 1.3 KB
/
Makefile
File metadata and controls
56 lines (41 loc) · 1.3 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
CONTAINER_NAME=runtime-image-scanner
REGISTRY=gcr.io/totvs-kubernetes-service/$(CONTAINER_NAME)
VERSION_FILE=version.py
#Variable used only to download Trivy locally. For containers, the versions are declared in the Dockerfile.
TRIVY_VERSION=0.58.0
RC_VERSION=3
patch: build-patch git-push
minor: build-minor git-push
major: build-major git-push
export LOG_LEVEL=invalid
trivy:
TRIVY_VERSION=$(TRIVY_VERSION) scripts/download_trivy.sh
test: unit-test test-reports badge min-coverage
unit-test:
coverage run -m unittest tests.py
test-reports:
coverage html
badge:
coverage-badge -fo coverage.svg
min-coverage:
scripts/min_coverage.sh
build-dev:
docker build --network host -t $(CONTAINER_NAME):devel .
@echo "Generated a local docker image with name: $(CONTAINER_NAME):devel"
build-patch:
bumpversion patch
build-minor:
bumpversion minor
build-major:
bumpversion major
build:
@$(eval VERSION=`cat $(VERSION_FILE) | grep "VERSION"|cut -d"=" -f2 | sed -e 's/"//g' -e 's/ //g'`)
docker build -t $(REGISTRY):v$(VERSION)-rc-$(RC_VERSION) .
push:
@$(eval VERSION=`cat $(VERSION_FILE) | grep "VERSION"|cut -d"=" -f2 | sed -e 's/"//g' -e 's/ //g'`)
docker push $(REGISTRY):v$(VERSION)-rc-$(RC_VERSION)
clean-dev:
docker rmi -f $(CONTAINER_NAME):devel
git-push:
git push --all origin
git push --tags origin