-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (38 loc) · 907 Bytes
/
Copy pathMakefile
File metadata and controls
52 lines (38 loc) · 907 Bytes
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
NAME=ign-validator
TRIVY_VERSION ?= 0.72.0
TRIVY := .tools/trivy
all: build
.PHONY: package
package: deb rpm
.PHONY: deb
deb: build
bash build-deb.sh
.PHONY: rpm
rpm: build
bash build-rpm.sh
.PHONY: test
test:
mvn clean package
.PHONY: build
build:
mvn clean package -Dmaven.test.skip=true
$(TRIVY):
mkdir -p .tools
curl -sfL "https://github.com/aquasecurity/trivy/releases/download/v$(TRIVY_VERSION)/trivy_$(TRIVY_VERSION)_Linux-64bit.tar.gz" \
| tar xz -C .tools trivy
.PHONY: trivy
trivy: $(TRIVY)
mvn install -Dmaven.test.skip=true -q
$(TRIVY) fs --download-db-only --quiet pom.xml
@echo "=== Scan Maven dependencies (pom.xml) ==="
$(TRIVY) fs --scanners vuln --severity HIGH,CRITICAL,MEDIUM pom.xml
.PHONY: sonar
sonar: coverage
mvn sonar:sonar
.PHONY: coverage
coverage:
mvn clean package -Dmaven.test.failure.ignore=true
mvn jacoco:report
.PHONY: clean
clean:
mvn clean