forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
315 lines (279 loc) · 9.41 KB
/
azure-pipelines.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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
# Docker image
# Build a Docker image to deploy, run, or push to a container registry.
# Add steps that use Docker Compose, tag images, push to a registry, run an image, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/docker
trigger:
batch: true
branches:
include:
- master
pr:
branches:
include:
- master
paths:
exclude:
- docs/src/main/asciidoc/*
- docs/src/main/asciidoc/images/*
- README.md
- CONTRIBUTING.md
- LICENSE.txt
- dco.txt
- .github/ISSUE_TEMPLATE/*.md
variables:
MAVEN_CACHE_FOLDER: $(Pipeline.Workspace)/.m2/repository/
MAVEN_OPTS: '-Dmaven.repo.local=$(MAVEN_CACHE_FOLDER)'
QUARKUS_LOCAL_REPO: $(MAVEN_CACHE_FOLDER)
stages:
#This stage uses the azure caching feature to reduce the downloads that are performed from central, which greatly speeds up CI
#This is it's own stage to prevent Quarkus artifacts produced by the build from being cached
- stage: cache_maven_repo_stage
displayName: 'Maven Cache'
jobs:
- job: Cache_Maven_Repo
displayName: 'Linux Maven Repo'
timeoutInMinutes: 30
pool:
vmImage: 'Ubuntu 16.04'
variables:
imageName: 'quarkus:$(build.buildId)'
steps:
- task: CacheBeta@0
inputs:
key: maven | bom/runtime/pom.xml #if we attempt to use all poms then when they get copied to target everything breaks. This should be good enough, it does not need to be perfect
path: $(MAVEN_CACHE_FOLDER)
securityNamespace: cache
cacheHitVar: CACHE_RESTORED
displayName: Cache Maven local repo
- task: Maven@3
displayName: 'Maven Build'
condition: ne(variables.CACHE_RESTORED, 'true')
inputs:
goals: 'package'
mavenOptions: $(MAVEN_OPTS)
options: '-B --settings azure-mvn-settings.xml -DskipTests=true -Dno-format'
- job: Cache_Windows_Maven_Repo #windows has different line endings so the cache key is different
displayName: 'Windows Maven Repo'
timeoutInMinutes: 30
pool:
vmImage: 'vs2017-win2016'
variables:
imageName: 'quarkus-windows:$(build.buildId)'
steps:
- task: CacheBeta@0
inputs:
key: mavenWindows | bom/runtime/pom.xml #if we attempt to use all poms then when they get copied to target everything breaks. This should be good enough, it does not need to be perfect
path: $(MAVEN_CACHE_FOLDER)
securityNamespace: cache
cacheHitVar: CACHE_RESTORED
displayName: Cache Maven local repo
- task: Maven@3
displayName: 'Maven Build'
condition: ne(variables.CACHE_RESTORED, 'true')
inputs:
goals: 'package'
mavenOptions: $(MAVEN_OPTS)
options: '-B --settings azure-mvn-settings.xml -DskipTests=true -Dno-format'
#This stage builds the Quarkus artifacts needed for native image testing
- stage: build_artifact_for_native_stage
displayName: 'Build for Native'
dependsOn: cache_maven_repo_stage
jobs:
- job: Build_JDK8_Linux
displayName: 'Build JDK8 Linux'
timeoutInMinutes: 60
pool:
vmImage: 'Ubuntu 16.04'
steps:
- task: CacheBeta@0 #we know the very first job will have restored or created this, so this will never write built artifacts to the cache
inputs:
key: maven | bom/runtime/pom.xml
path: $(Pipeline.Workspace)/.m2/repository/
securityNamespace: cache
displayName: Restore Maven Cache
- task: Maven@3
displayName: 'Maven Build'
inputs:
goals: 'install'
mavenOptions: $(MAVEN_OPTS)
options: '-DskipTests -Dno-format'
- publish: $(MAVEN_CACHE_FOLDER)
artifact: BuiltMavenRepo
- stage: run_jvm_tests_stage
displayName: 'Run JVM Tests'
dependsOn: cache_maven_repo_stage
jobs:
- job: Build_JDK8_Linux
displayName: 'Build JDK8 Linux'
timeoutInMinutes: 60
pool:
vmImage: 'Ubuntu 16.04'
steps:
- template: ci-templates/jvm-build-steps.yaml
- job: Windows_Build
displayName: 'Windows JVM Build'
timeoutInMinutes: 60
pool:
vmImage: 'vs2017-win2016'
MAVEN_CACHE_FOLDER: $(Pipeline.Workspace)/.m2/repository
MAVEN_OPTS: '-Dmaven.repo.local=$(MAVEN_CACHE_FOLDER)'
steps:
- task: CacheBeta@0 #we know the very first job will have restored or created this, so this will never write built artifacts to the cache
inputs:
key: mavenWindows | bom/runtime/pom.xml
path: $(MAVEN_CACHE_FOLDER)
securityNamespace: cache
displayName: Restore Maven Cache
- task: Maven@3
displayName: 'Maven Build'
inputs:
goals: 'install'
mavenOptions: $(MAVEN_OPTS)
options: '-B --settings azure-mvn-settings.xml -Dno-native -Dno-format'
- job: Build_JDK11_Linux
timeoutInMinutes: 60
displayName: 'Linux JDK11 Build'
pool:
vmImage: 'Ubuntu 16.04'
steps:
- template: ci-templates/jvm-build-steps.yaml
parameters:
jdk: '1.11'
- job: Build_JDK12_Linux
timeoutInMinutes: 60
displayName: 'Linux JDK12 Build'
pool:
vmImage: 'Ubuntu 16.04'
steps:
- template: ci-templates/jvm-build-steps.yaml
parameters:
jdk: '1.12'
- job: Run_TCKs
timeoutInMinutes: 45
pool:
vmImage: 'Ubuntu 16.04'
steps:
- task: Maven@3
displayName: 'Maven Install'
inputs:
goals: 'install'
mavenOptions: $(MAVEN_OPTS)
options: '-B --settings azure-mvn-settings.xml -Dno-native -Dno-format -DskipTests -Dtcks'
- task: Maven@3
displayName: 'Maven Verify'
inputs:
goals: 'verify'
mavenOptions: $(MAVEN_OPTS)
mavenPomFile: 'tcks/pom.xml'
- stage: run_native_tests_stage
displayName: 'Native Tests'
dependsOn: build_artifact_for_native_stage
jobs:
- template: ci-templates/native-build-steps.yaml
parameters:
modules: main
name: main
postgres: true
- template: ci-templates/native-build-steps.yaml
parameters:
timeoutInMinutes: 25
modules:
- jpa-h2
- jpa-mariadb
- jpa-mssql
- jpa-derby
name: jpa_db
- template: ci-templates/native-build-steps.yaml
parameters:
timeoutInMinutes: 25
modules:
- jpa
- jpa-postgresql
- jpa-mysql
name: jpa
postgres: true
mysql: true
- template: ci-templates/native-build-steps.yaml
parameters:
timeoutInMinutes: 15
modules:
- amazon-dynamodb
- amazon-lambda
name: amazon
dynamodb: true
- template: ci-templates/native-build-steps.yaml
parameters:
timeoutInMinutes: 20
modules:
- artemis-core
- artemis-jms
- kafka
name: messaging
- template: ci-templates/native-build-steps.yaml
parameters:
timeoutInMinutes: 20
modules:
- elytron-security-oauth2
- elytron-security
- oidc
name: security
keycloak: true
- template: ci-templates/native-build-steps.yaml
parameters:
timeoutInMinutes: 30
modules:
- flyway
- hibernate-orm-panache
- reactive-pg-client
name: database
postgres: true
- template: ci-templates/native-build-steps.yaml
parameters:
modules:
- infinispan-cache-jpa
- infinispan-client
- mongodb-client
- mongodb-panache
- neo4j
- narayana-stm
name: data
- template: ci-templates/native-build-steps.yaml
parameters:
timeoutInMinutes: 25
modules:
- resteasy-jackson
- vertx
- vertx-http
- virtual-http
name: http
- template: ci-templates/native-build-steps.yaml
parameters:
timeoutInMinutes: 25
modules:
- jackson
- jgit
- kogito
- kubernetes-client
name: misc1
- template: ci-templates/native-build-steps.yaml
parameters:
timeoutInMinutes: 25
modules:
- tika
- hibernate-validator
- test-extension
name: misc2
- template: ci-templates/native-build-steps.yaml
parameters:
timeoutInMinutes: 25
modules:
- spring-di
- spring-web
- spring-data-jpa
name: spring
- template: ci-templates/native-build-steps.yaml
parameters:
timeoutInMinutes: 15
modules:
- hibernate-search-elasticsearch
name: hibernate_search_elasticsearch