This repository was archived by the owner on Mar 3, 2026. It is now read-only.
forked from jooby-project/jooby
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
122 lines (107 loc) · 2.76 KB
/
.gitlab-ci.yml
File metadata and controls
122 lines (107 loc) · 2.76 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# Cache downloaded dependencies and plugins between builds.
# To keep cache across branches add 'key: "$CI_JOB_REF_NAME"'
cache:
# key: "$CI_COMMIT_SHA-$CI_COMMIT_REF_NAME"
key: "$CI_JOB_REF_NAME"
paths:
- .m2
- target
- builds
untracked: true
variables:
DOCKER_DRIVER: overlay2
MAVEN_OPTS: "-XX:+TieredCompilation -XX:TieredStopAtLevel=1 -Dmaven.repo.local=.m2 -Djava.awt.headless=true"
MAVEN_CMD: "mvn -T 1C --batch-mode --fail-fast"
# Debug and tracing.
# CI_DEBUG_TRACE: "true"
# GIT_DEBUG_LOOKUP: "1"
# GIT_TRACE: "1"
# GIT_TRACE_PACKET: "1"
# GIT_TRANSLOOP_DEBUG: "1"
# GIT_TRANSPORT_HELPER_DEBUG: "1"
stages:
- prepare
- build
- test
#- coverage
- quality
- security
##########################################################
# PREPARE
##########################################################
prepare:cacherampup:
image: maven:3-jdk-8
stage: prepare
script: "echo cache rampup"
artifacts:
paths:
- .
expire_in: 1 week
prepare:linter:
image: codacy/codacy-pmdjava:latest
stage: prepare
script: "tini"
artifacts:
paths:
- .
expire_in: 1 week
##########################################################
# BUILD
##########################################################
build:maven:
image: maven:3-jdk-8
stage: build
script: "$MAVEN_CMD -DskipTests=true -Dmaven.javadoc.skip=true clean install"
artifacts:
paths:
- .
expire_in: 1 week
##########################################################
# TEST
##########################################################
test:unit-testing:
image: maven:3-jdk-8
stage: test
script: "$MAVEN_CMD -DskipTests=false -Dmaven.javadoc.skip=true test"
artifacts:
paths:
- .
expire_in: 1 week
test:mutation-testing:
image: maven:3-jdk-8
stage: test
script: "echo mutation-test"
artifacts:
paths:
- .
expire_in: 1 week
test:end2end-testing:
image: maven:3-jdk-8
stage: test
script: "echo end2end-test"
artifacts:
paths:
- .
expire_in: 1 week
##########################################################
# QUALITY
##########################################################
quality:codequality:
image: maven:3.3.9-jdk-8-alpine
stage: quality
allow_failure: true
script:
- "$MAVEN_CMD org.jacoco:jacoco-maven-plugin:prepare-agent sonar:sonar -Dsonar.branch.name=$CI_COMMIT_REF_NAME -Dsonar.host.url=$SONAR_URL -Dsonar.login=$SONAR_TOKEN -Dsonar.organization=$SONAR_ORGANIZATION"
##########################################################
# SECURITY
##########################################################
security:retirejs:
stage: security
image: gruebel/retirejs
allow_failure: true
script:
- retire --path . --outputformat json --includemeta
artifacts:
paths:
- .
expire_in: 1 week