-
-
Notifications
You must be signed in to change notification settings - Fork 28
/
.gitlab-ci.yml
105 lines (92 loc) · 2.37 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
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
image: openjdk:8
variables:
SUFFIX: ${CI_PIPELINE_ID}-${CI_COMMIT_REF_NAME}
PROJECTNAME: KeysPerSecond
before_script:
- java -version
- cd ${PROJECTNAME}
- ls -l
- chmod -R 755 ./*
stages:
- check
- compile
- test
- status
- javadoc
endings:
allow_failure: true
script: curl ${SERVER}ci/lf.sh | bash
stage: check
sonar:
image:
name: sonarsource/sonar-scanner-cli:5.0
entrypoint: [""]
allow_failure: true
script:
- ./gradlew -PrefName=${CI_COMMIT_REF_NAME} -PnexusPublic=${NEXUS_PUBLIC} assemble
- ./gradlew -PrefName=${CI_COMMIT_REF_NAME} -PnexusPublic=${NEXUS_PUBLIC} test jacocoTestReport
- sonar-scanner
stage: check
only:
- master
spotbugs:
allow_failure: true
script: ./gradlew -PrefName=${CI_COMMIT_REF_NAME} -PnexusPublic=${NEXUS_PUBLIC} spotbugsMain
stage: check
artifacts:
name: SpotBugs-${SUFFIX}
expire_in: 1 day
when: always
paths:
- ./${PROJECTNAME}/build/reports/spotbugs/main/spotbugs.html
pending:
allow_failure: true
script: curl ${SERVER}ci/pending.sh | bash
stage: compile
success:
allow_failure: true
script: curl ${SERVER}ci/success.sh | bash
when: on_success
stage: status
failure:
allow_failure: true
script: curl ${SERVER}ci/failure.sh | bash
when: on_failure
stage: status
verify:
allow_failure: true
script: curl ${SERVER}ci/javadoc.sh | bash
stage: javadoc
coverage: '/\([0-9]{2,3}\.[0-9]{2}%\)/'
javadoc:
script:
- ./gradlew -PrefName=${CI_COMMIT_REF_NAME} -PnexusPublic=${NEXUS_PUBLIC} javadoc
- mv ./build/docs/javadoc ../
stage: javadoc
artifacts:
name: Javadoc-${SUFFIX}
expire_in: 1 day
paths:
- javadoc/
compile:
script:
- ./gradlew -PrefName=${CI_COMMIT_REF_NAME} -PnexusPublic=${NEXUS_PUBLIC} :shadowJar
- ./gradlew -PrefName=${CI_COMMIT_REF_NAME} -PnexusPublic=${NEXUS_PUBLIC} :createExe
- mv ./build/libs/* ..
- mv ./build/launch4j/*.exe ..
stage: compile
artifacts:
name: KeysPerSecond-${SUFFIX}
expire_in: 1 day
paths:
- KeysPerSecond-*.jar
- KeysPerSecond-*.exe
test:
script:
- ./gradlew -PrefName=${CI_COMMIT_REF_NAME} -PnexusPublic=${NEXUS_PUBLIC} :test :jacocoTestReport
- cat ./build/reports/jacoco/test/html/index.html
stage: test
coverage: '/Total.*?([0-9]{1,3})%/'
artifacts:
reports:
junit: ./${PROJECTNAME}/build/test-results/test/TEST-*.xml