-
Notifications
You must be signed in to change notification settings - Fork 44
/
Copy pathMakefile
57 lines (39 loc) · 1.48 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
51
52
53
54
55
56
57
MVN_REPORT := target/site/surefire-report.html
TIMESTAMP := $(shell date +'%F %T')
MVN_ARGS := -Dorg.slf4j.simpleLogger.showDateTime=true \
-Dorg.slf4j.simpleLogger.dateTimeFormat="yyyy-MM-dd HH:mm:ss.SSS" \
-Dorg.slf4j.simpleLogger.showLogName=false \
-Dorg.slf4j.simpleLogger.showShortLogName=false \
-Dorg.slf4j.simpleLogger.showThreadName=false
compile: # compile project
@./mvnw $(MVN_ARGS) clean compile test-compile
package:
@./mvnw $(MVN_ARGS) package -DskipTests
start-api:
@./mvnw $(MVN_ARGS) clean spring-boot:run
start-jar: package
@java -jar ./target/demo-codigo-*.jar
start-docker:
@docker run --rm --name demo-aplicacao -p 8080:8080 -it demo/aplicacao
debug-api:
@./mvnw $(MVN_ARGS) clean spring-boot:run -Dspring-boot.run.profiles=dev -Dspring.jmx.enabled=true
## Test
unit-test:
@./mvnw $(MVN_ARGS) test
integration-test:
# @./mvnw $(MVN_ARGS) failsafe:integration-test
@./mvnw $(MVN_ARGS) test -P integration-test
system-test:
@./mvnw $(MVN_ARGS) test -Psystem-test
@echo $(TIMESTAMP) [INFO] cucumber HTML report generate in: target/cucumber-reports/cucumber.html
performance-test:
@./mvnw $(MVN_ARGS) gatling:test -Pperformance-test
test: unit-test integration-test
report-maven: # Gerar relatorio HTML utilizando maven
@./mvnw $(MVN_ARGS) surefire-report:report
@echo $(TIMESTAMP) [INFO] maven report generate in: $(MVN_REPORT)
report-allure:
allure serve target
## Docker
docker-image: package
docker build -t demo/aplicacao -f ./docker/Dockerfile .