-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
62 lines (53 loc) · 1.3 KB
/
.gitlab-ci.yml
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
stages:
- validate
- build
- test
cache:
key: "$CI_PROJECT_ID"
paths:
- .m2/repository
variables:
MAVEN_OPTS: -Dmaven.repo.local=.m2/repository
MAVEN_ARGS: "--batch-mode --threads 4"
EXTERNAL_DATA: "/external_data"
SCRIPTS: "/external_data/scripts"
TESTS: "/external_data/tests"
GIT_SSL_NO_VERIFY: "true"
image: hyperspeeed/sep2021:1.2
before_script:
- python3 -V
- mvn -v
- mvn dependency:resolve -B
############################### JOBS ###############################
Validate:
stage: validate
script: "mvn $MAVEN_ARGS validate"
Checkstyle:
stage: validate
script:
- "mvn $MAVEN_ARGS checkstyle:check"
Compile:
stage: build
script:
- "mvn $MAVEN_ARGS compile"
- "mvn $MAVEN_ARGS war:war"
artifacts:
expire_in: 1 week
name: "Artifact"
paths:
- "target/*.war"
Unit-Tests:
stage: test
script:
- "wget http://femtopedia.de/cover2cover.py"
- "mvn $MAVEN_ARGS test"
- "python3 cover2cover.py target/site/jacoco/jacoco.xml src/main/java > cobertura-coverage.xml"
- "cat target/site/jacoco/index.html | grep -o '<tfoot>.*</tfoot>'"
artifacts:
expire_in: 1 week
name: "Test Report"
paths:
- "target/site/jacoco"
reports:
junit: "target/*-reports/TEST-*.xml"
cobertura: "cobertura-coverage.xml"