-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
172 lines (156 loc) · 4.16 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
image: gradle:7.5.1-jdk11
before_script:
- GRADLE_USER_HOME="$(pwd)/.gradle"
- export GRADLE_USER_HOME
build:
stage: build
script:
- gradle raygun-spring-boot-starter:jar
- gradle raygun-spring-boot-starter-example:jar
cache:
key: "$CI_COMMIT_REF_NAME"
policy: push
paths:
- .gradle
- raygun-spring-boot-starter/build
- raygun-spring-boot-starter-example/build
check:starter:
extends:
- .pull-build-cache
stage: test
script:
- >
gradle raygun-spring-boot-starter:check
raygun-spring-boot-starter:jacocoTestReport
raygun-spring-boot-starter:jacocoTestCoverageVerification
coverage: '/ - Branch Coverage: ([0-9.]+)%/'
artifacts:
when: always
reports:
junit:
- raygun-spring-boot-starter/build/test-results/test/TEST-*.xml
paths:
- raygun-spring-boot-starter/build/reports/jacoco/test/jacocoTestReport.xml
check:starter:example:
extends:
- .pull-build-cache
stage: test
script:
- >
gradle raygun-spring-boot-starter-example:check
raygun-spring-boot-starter-example:jacocoTestReport
raygun-spring-boot-starter-example:jacocoTestCoverageVerification
artifacts:
when: always
reports:
junit:
- raygun-spring-boot-starter-example/build/test-results/test/TEST-*.xml
check:starter:example:web:
extends:
- .pull-build-cache
stage: test
script:
- >
gradle raygun-spring-boot-starter-example-web:check
raygun-spring-boot-starter-example-web:jacocoTestReport
raygun-spring-boot-starter-example-web:jacocoTestCoverageVerification
artifacts:
when: always
reports:
junit:
- raygun-spring-boot-starter-example-web/build/test-results/test/TEST-*.xml
check:starter:example:web-services:
extends:
- .pull-build-cache
stage: test
script:
- >
gradle raygun-spring-boot-starter-example-web-services:check
raygun-spring-boot-starter-example-web-services:jacocoTestReport
raygun-spring-boot-starter-example-web-services:jacocoTestCoverageVerification
artifacts:
when: always
reports:
junit:
- raygun-spring-boot-starter-example-web-services/build/test-results/test/TEST-*.xml
visualize:
extends:
- .pull-build-cache
stage: deploy
script: gradle raygun-spring-boot-starter:jacocoToCobertura
needs: ["check:starter"]
artifacts:
reports:
coverage_report:
coverage_format: cobertura
path: raygun-spring-boot-starter/build/reports/jacoco/test/cobertura-jacocoTestReport.xml
paths:
- raygun-spring-boot-starter/build/reports/jacoco/test/cobertura-jacocoTestReport.xml
publish:company:snapshot:
extends:
- .publish
- .snapshot
script: gradle raygun-spring-boot-starter:publishMavenPublicationToCompanySnapshotRepository
environment:
name: snapshot
deployment_tier: staging
publish:company:release:
extends:
- .publish
- .release
script: gradle raygun-spring-boot-starter:publishMavenPublicationToCompanyReleaseRepository
environment:
name: release
deployment_tier: production
publish:central:snapshot:
extends:
- .publish
- .snapshot
script: gradle raygun-spring-boot-starter:publishMavenPublicationToCentralSnapshotRepository
environment:
name: snapshot
deployment_tier: staging
publish:central:release:
extends:
- .publish
- .release
script: gradle raygun-spring-boot-starter:publishMavenPublicationToCentralReleaseRepository
environment:
name: release
deployment_tier: production
pages:
extends:
- .release
- .pull-build-cache
stage: deploy
script:
- gradle raygun-spring-boot-starter:javadoc
- mkdir .public
- cp -r raygun-spring-boot-starter/build/docs/javadoc/* .public
- rm -rf public
- mv .public public
artifacts:
paths:
- public
.publish:
extends:
- .pull-build-cache
stage: deploy
.snapshot:
only:
- branches
except:
- tags
.release:
only:
- tags
except:
- branches
.pull-build-cache:
cache:
key: "$CI_COMMIT_REF_NAME"
policy: pull
paths:
- .gradle
- raygun-spring-boot-starter/build
- raygun-spring-boot-starter-example/build