-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathJenkinsfile
443 lines (401 loc) · 15.3 KB
/
Jenkinsfile
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
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
#!/usr/bin/env groovy
def contact = "[email protected]"
def watcher = SCALE_CI_WATCHER.toString().toUpperCase()
def pipeline = PIPELINE.toString().toUpperCase()
def stage_two = env.STAGE_TWO.toString().toUpperCase() ?: ""
def stage_three = env.STAGE_THREE.toString().toUpperCase() ?: ""
def stage_four = env.STAGE_FOUR.toString().toUpperCase() ?: ""
def stage_five = env.STAGE_FIVE.toString().toUpperCase() ?: ""
def stage_six = env.STAGE_SIX.toString().toUpperCase() ?: ""
def webfuse_install = env.WEBFUSE_INSTALL.toString().toUpperCase() ?: ""
def build_tracker = SCALE_CI_BUILD_TRACKER.toString().toUpperCase()
def tooling = TOOLING.toString().toUpperCase()
def run_conformance = CONFORMANCE.toString().toUpperCase()
def openshiftv4_install_on_aws = OPENSHIFTv4_INSTALL_ON_AWS.toString().toUpperCase()
def openshiftv4_install_on_azure = OPENSHIFTv4_INSTALL_ON_AZURE.toString().toUpperCase()
def openshiftv4_install_on_gcp = OPENSHIFTv4_INSTALL_ON_GCP.toString().toUpperCase()
def openshiftv4_install_on_osp = OPENSHIFTv4_INSTALL_ON_OSP.toString().toUpperCase()
def openshiftv4_install_on_bm = OPENSHIFTv4_INSTALL_ON_BM.toString().toUpperCase()
def ocpv4_scale = OPENSHIFTv4_SCALE.toString().toUpperCase()
def cluster_density = CLUSTER_DENSITY.toString().toUpperCase()
def kubelet_density = KUBELET_DENSITY.toString().toUpperCase()
def kubelet_density_light = KUBELET_DENSITY_LIGHT.toString().toUpperCase()
def install_openstack = OPENSTACK_INSTALL.toString().toUpperCase()
def browbeat = BROWBEAT_INSTALL.toString().toUpperCase()
def ingress_performance = INGRESS_PERFORMANCE.toString().toUpperCase()
def logging = LOGGING_SCALE_TEST.toString().toUpperCase()
def pgbench_test = PGBENCH_TEST.toString().toUpperCase()
def prometheus_test = PROMETHEUS_TEST.toString().toUpperCase()
def mongodb_ycsb_test = MONGODB_YCSB_TEST.toString().toUpperCase()
def services_per_namespace = SERVICES_PER_NAMESPACE.toString().toUpperCase()
def deployments_per_ns = DEPLOYMENTS_PER_NS.toString().toUpperCase()
def ns_per_cluster = NS_PER_CLUSTER.toString().toUpperCase()
def byo = BYO_SCALE_TEST.toString().toUpperCase()
def baseline = BASELINE_SCALE_TEST.toString().toUpperCase()
def run_uperf = UPERF.toString().toUpperCase()
def kraken = KRAKEN.toString().toUpperCase()
def osde2e = SCALE_CI_MS_OSDE2E.toString().toUpperCase()
def rosa = SCALE_CI_MS_ROSA.toString().toUpperCase()
def node_label = NODE_LABEL.toString()
def run_id = "${env.JOB_NAME}-${env.BUILD_NUMBER}"
def scale_ci_diagnosis = SCALE_CI_DIAGNOSIS.toString().toUpperCase()
node (node_label) {
env.RUN_ID = "${env.JOB_NAME}-${env.BUILD_NUMBER}"
println "Run ID is ${env.RUN_ID}"
// setup the repo containing the pipeline scripts
stage('cloning pipeline repo') {
checkout scm
}
// creates/updates jenkins jobs using the jjb templates
if (watcher == "TRUE") {
env.WORKLOAD="ATS-SCALE-CI-WATCHER"
env.WORKLOAD_PROPERTIES_FILE=SCALE_CI_WATCHER_PROPERTY_FILE
load "pipeline-scripts/workload.groovy"
}
if (pipeline == "TRUE") {
env.PIPELINE_STAGE=1
if ( build_tracker == "TRUE") {
env.WORKLOAD="SCALE-CI-BUILD-TRACKER"
env.WORKLOAD_PROPERTIES_FILE=SCALE_CI_BUILD_TRACKER_PROPERTY_FILE
load "pipeline-scripts/workload.groovy"
}
if (openshiftv4_install_on_aws == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=OPENSHIFTv4_ON_AWS_PROPERTY_FILE
env.WORKLOAD="ATS-SCALE-CI-OCP-AWS-DEPLOY"
load "pipeline-scripts/workload.groovy"
}
if (openshiftv4_install_on_azure == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=OPENSHIFTv4_ON_AZURE_PROPERTY_FILE
env.WORKLOAD="ATS-SCALE-CI-OCP-AZURE-DEPLOY"
load "pipeline-scripts/workload.groovy"
}
if (openshiftv4_install_on_gcp == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=OPENSHIFTv4_ON_GCP_PROPERTY_FILE
env.WORKLOAD="ATS-SCALE-CI-OCP-GCP-DEPLOY"
load "pipeline-scripts/workload.groovy"
}
if (openshiftv4_install_on_osp == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=OPENSHIFTv4_ON_OSP_PROPERTY_FILE
env.WORKLOAD="ATS-SCALE-CI-OCP-OSP-DEPLOY"
load "pipeline-scripts/workload.groovy"
}
if (osde2e == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=SCALE_CI_MS_OSDE2E_PROPERTIES_FILE
env.WORKLOAD="SCALE-CI-MS-OSDE2E"
load "pipeline-scripts/workload.groovy"
}
if (openshiftv4_install_on_bm == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=OPENSHIFTv4_ON_BM_PROPERTY_FILE
env.WORKLOAD="ATS-SCALE-CI-OCP-BM-DEPLOY"
load "pipeline-scripts/workload.groovy"
}
if (webfuse_install == "TRUE") {
if (openshiftv4_install_on_bm == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=WEBFUSE_PROPERTY_FILE
env.WORKLOAD="ATS-SCALE-CI-OCP-POST-CONFIG-WEBFUSE"
load "pipeline-scripts/workload.groovy"
}
}
if (rosa == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=SCALE_CI_MS_ROSA_PROPERTIES_FILE
env.WORKLOAD="SCALE-CI-MS-ROSA"
load "pipeline-scripts/workload.groovy"
}
if (ingress_performance == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=INGRESS_PERFORMANCE_PROPERTY_FILE
env.WORKLOAD="INGRESS-PERFORMANCE"
load "pipeline-scripts/workload.groovy"
}
if (run_uperf == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=UPERF_PROPERTIES_FILE
env.WORKLOAD="RIPSAW-UPERF"
load "pipeline-scripts/workload.groovy"
}
if (ocpv4_scale == "TRUE") {
if (openshiftv4_install_on_bm == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=OPENSHIFTv4_ON_BM_PROPERTY_FILE
env.WORKLOAD="ATS-SCALE-CI-OCP-BM-SCALEUP"
load "pipeline-scripts/workload.groovy"
} else {
env.WORKLOAD_PROPERTIES_FILE=OPENSHIFTv4_SCALE_PROPERTY_FILE
env.WORKLOAD="ATS-SCALE-CI-SCALE"
load "pipeline-scripts/workload.groovy"
}
}
if (stage_two == "TRUE") {
env.PIPELINE_STAGE=2
if (ingress_performance == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=INGRESS_PERFORMANCE_PROPERTY_FILE
env.WORKLOAD="INGRESS-PERFORMANCE"
load "pipeline-scripts/workload.groovy"
}
if (kubelet_density_light == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=KUBELET_DENSITY_LIGHT_PROPERTIES_FILE
env.WORKLOAD="RIPSAW-NODE-DENSITY-LIGHT"
load "pipeline-scripts/workload.groovy"
}
if (kubelet_density == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=KUBELET_DENSITY_PROPERTIES_FILE
env.WORKLOAD="RIPSAW-NODE-DENSITY"
load "pipeline-scripts/workload.groovy"
}
if (cluster_density == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=CLUSTER_DENSITY_PROPERTIES_FILE
env.WORKLOAD="RIPSAW-CLUSTER-DENSITY"
load "pipeline-scripts/workload.groovy"
}
if (ocpv4_scale == "TRUE") {
if (openshiftv4_install_on_bm == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=OPENSHIFTv4_ON_BM_PROPERTY_FILE
env.WORKLOAD="ATS-SCALE-CI-OCP-BM-SCALEUP"
load "pipeline-scripts/workload.groovy"
} else {
env.WORKLOAD_PROPERTIES_FILE=OPENSHIFTv4_SCALE_PROPERTY_FILE
env.WORKLOAD="ATS-SCALE-CI-SCALE"
load "pipeline-scripts/workload.groovy"
}
}
}
if (stage_three == "TRUE") {
env.PIPELINE_STAGE=3
if (cluster_density == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=CLUSTER_DENSITY_PROPERTIES_FILE
env.WORKLOAD="RIPSAW-CLUSTER-DENSITY"
load "pipeline-scripts/workload.groovy"
}
if (ocpv4_scale == "TRUE") {
if (openshiftv4_install_on_bm == "FALSE") {
env.WORKLOAD_PROPERTIES_FILE=OPENSHIFTv4_SCALE_PROPERTY_FILE
env.WORKLOAD="ATS-SCALE-CI-SCALE"
load "pipeline-scripts/workload.groovy"
}
}
}
if (stage_four == "TRUE") {
env.PIPELINE_STAGE=4
if (cluster_density == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=CLUSTER_DENSITY_PROPERTIES_FILE
env.WORKLOAD="RIPSAW-CLUSTER-DENSITY"
load "pipeline-scripts/workload.groovy"
}
if (ocpv4_scale == "TRUE") {
if (openshiftv4_install_on_bm == "FALSE") {
env.WORKLOAD_PROPERTIES_FILE=OPENSHIFTv4_SCALE_PROPERTY_FILE
env.WORKLOAD="ATS-SCALE-CI-SCALE"
load "pipeline-scripts/workload.groovy"
}
}
}
if (stage_five == "TRUE") {
env.PIPELINE_STAGE=5
if (cluster_density == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=CLUSTER_DENSITY_PROPERTIES_FILE
env.WORKLOAD="RIPSAW-CLUSTER-DENSITY"
load "pipeline-scripts/workload.groovy"
}
if (ocpv4_scale == "TRUE") {
if (openshiftv4_install_on_bm == "FALSE") {
env.WORKLOAD_PROPERTIES_FILE=OPENSHIFTv4_SCALE_PROPERTY_FILE
env.WORKLOAD="ATS-SCALE-CI-SCALE"
load "pipeline-scripts/workload.groovy"
}
}
}
if (stage_six == "TRUE") {
env.PIPELINE_STAGE=6
if (cluster_density == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=CLUSTER_DENSITY_PROPERTIES_FILE
env.WORKLOAD="RIPSAW-CLUSTER-DENSITY"
load "pipeline-scripts/workload.groovy"
}
if (ocpv4_scale == "TRUE") {
if (openshiftv4_install_on_bm == "FALSE") {
env.WORKLOAD_PROPERTIES_FILE=OPENSHIFTv4_SCALE_PROPERTY_FILE
env.WORKLOAD="ATS-SCALE-CI-SCALE"
load "pipeline-scripts/workload.groovy"
}
}
}
} else {
// Queries UMB message to capture the OCP 4.x payloads
if ( build_tracker == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=SCALE_CI_BUILD_TRACKER_PROPERTY_FILE
env.WORKLOAD="SCALE-CI-BUILD-TRACKER"
load "pipeline-scripts/workload.groovy"
}
// stage to install openstack
if (install_openstack == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=OPENSHIFTv4_ON_OSP_PROPERTY_FILE
env.WORKLOAD="ATS-SCALE-CI-OCP-OSP-DEPLOY"
load "pipeline-scripts/workload.groovy"
}
// stage to set up browbeat
if (browbeat == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=BROWBEAT_PROPERTY_FILE
env.WORKLOAD="scale-ci_install_Browbeat"
load "pipeline-scripts/workload.groovy"
}
// stage to install openshift 4.x on AWS
if (openshiftv4_install_on_aws == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=OPENSHIFTv4_ON_AWS_PROPERTY_FILE
env.WORKLOAD="ATS-SCALE-CI-OCP-AWS-DEPLOY"
load "pipeline-scripts/workload.groovy"
}
// stage to install openshift 4.x on Azure
if (openshiftv4_install_on_azure == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=OPENSHIFTv4_ON_AZURE_PROPERTY_FILE
env.WORKLOAD="ATS-SCALE-CI-OCP-AZURE-DEPLOY"
load "pipeline-scripts/workload.groovy"
}
// stage to install openshift 4.x on GCP
if (openshiftv4_install_on_gcp == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=OPENSHIFTv4_ON_GCP_PROPERTY_FILE
env.WORKLOAD="ATS-SCALE-CI-OCP-GCP-DEPLOY"
load "pipeline-scripts/workload.groovy"
}
// stage to install OSP and OCP using jetpack
if (openshiftv4_install_on_osp == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=OPENSHIFTv4_ON_OSP_PROPERTY_FILE
env.WORKLOAD="ATS-SCALE-CI-OCP-OSP-DEPLOY"
load "pipeline-scripts/workload.groovy"
}
// stage to install OCP on BM using JetSki
if (openshiftv4_install_on_bm == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=OPENSHIFTv4_ON_BM_PROPERTY_FILE
env.WORKLOAD="ATS-SCALE-CI-OCP-BM-DEPLOY"
load "pipeline-scripts/workload.groovy"
}
// stage to setup pbench
if (tooling == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=TOOLING_PROPERTY_FILE
env.WORKLOAD="ATS-SCALE-CI-TOOLING"
load "pipeline-scripts/workload.groovy"
}
// stage to run conformance
if (run_conformance == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=CONFORMANCE_PROPERTY_FILE
env.WORKLOAD="ATS-SCALE-CI-CONFORMANCE"
load "pipeline-scripts/workload.groovy"
}
// stage to run OCP 4.X scaleup
if (ocpv4_scale == "TRUE") {
if (openshiftv4_install_on_bm == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=OPENSHIFTv4_ON_BM_PROPERTY_FILE
env.WORKLOAD="ATS-SCALE-CI-OCP-BM-SCALEUP"
load "pipeline-scripts/workload.groovy"
} else {
env.WORKLOAD_PROPERTIES_FILE=OPENSHIFTv4_SCALE_PROPERTY_FILE
env.WORKLOAD="ATS-SCALE-CI-SCALE"
load "pipeline-scripts/workload.groovy"
}
}
// stage to run ingress-performance scale test
if (ingress_performance == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=INGRESS_PERFORMANCE_PROPERTY_FILE
env.WORKLOAD="INGRESS-PERFORMANCE"
load "pipeline-scripts/workload.groovy"
}
// stage to run services per namespace test
if (services_per_namespace == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=SERVICES_PER_NAMESPACE_PROPERTY_FILE
env.WORKLOAD="ATS-SCALE-CI-SERVICES-PER-NAMESPACE"
load "pipeline-scripts/workload.groovy"
}
// stage to run deployments per ns test
if ( deployments_per_ns == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=DEPLOYMENTS_PER_NS_PROPERTY_FILE
env.WORKLOAD="ATS-SCALE-CI-DEPLOYMENTS-PER-NAMESPACE"
load "pipeline-scripts/workload.groovy"
}
// stage to run pgbench scale test
if ( pgbench_test == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=PGBENCH_PROPERTY_FILE
env.WORKLOAD="PGBENCH_SCALE_TEST"
load "pipeline-scripts/workload.groovy"
}
// stage to run mongodb ycsb scale test
if ( mongodb_ycsb_test == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=MONGOYCSB_PROPERTY_FILE
env.WORKLOAD="MONGODB_YCSB_TEST"
load "pipeline-scripts/workload.groovy"
}
// stage to run cluster-density scale test
if (cluster_density == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=CLUSTER_DENSITY_PROPERTIES_FILE
env.WORKLOAD="RIPSAW-CLUSTER-DENSITY"
load "pipeline-scripts/workload.groovy"
}
// stage to run node-density scale test
if (kubelet_density == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=KUBELET_DENSITY_PROPERTIES_FILE
env.WORKLOAD="RIPSAW-NODE-DENSITY"
load "pipeline-scripts/workload.groovy"
}
// stage to run node-density-light scale test
if (kubelet_density_light == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=KUBELET_DENSITY_LIGHT_PROPERTIES_FILE
env.WORKLOAD="RIPSAW-NODE-DENSITY-LIGHT"
load "pipeline-scripts/workload.groovy"
}
// stage to run ns_per_cluster test
if ( ns_per_cluster == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=NS_PER_CLUSTER_PROPERTY_FILE
env.WORKLOAD="ATS-SCALE-CI-NAMESPACES-PER-CLUSTER"
load "pipeline-scripts/workload.groovy"
}
// stage to run logging scale test
if (logging == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=LOGGING_PROPERTY_FILE
env.WORKLOAD="LOGGING-SCALE-TEST"
load "pipeline-scripts/workload.groovy"
}
// stage to run prometheus scale test
if ( prometheus_test == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=PROMETHEUS_PROPERTY_FILE
env.WORKLOAD=PROMETHEUS_TEST
load "pipeline-scripts/workload.groovy"
}
// stage to run BYO scale test
if (byo == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=BYO_PROPERTY_FILE
env.WORKLOAD=BYO-SCALE-TEST
load "pipeline-scripts/workload.groovy"
}
// stage to run baseline test
if (baseline == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=BASELINE_PROPERTY_FILE
env.WORKLOAD=BASELINE-SCALE-TEST
load "pipeline-scripts/workload.groovy"
}
// stage to run uperf test
if (run_uperf == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=UPERF_PROPERTIES_FILE
env.WORKLOAD="RIPSAW-UPERF"
load "pipeline-scripts/workload.groovy"
}
// stage to run kraken test
if (kraken == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=KRAKEN_PROPERTY_FILE
env.WORKLOAD="KRAKEN"
load "pipeline-scripts/workload.groovy"
}
//stage to run scale-ci-diagnosis
if (scale_ci_diagnosis == "TRUE") {
env.WORKLOAD_PROPERTIES_FILE=SCALE_CI_DIAGNOSIS_PROPERTIES_FILE
env.WORKLOAD="SCALE_CI_DIAGNOSIS"
load "pipeline-scripts/workload.groovy"
}
}
// cleanup the workspace
stage('cleaning workspace') {
deleteDir()
}
mail(
to: contact,
subject: "${env.JOB_NAME} ${env.BUILD_NUMBER} completed successfully",
body: """\
Jenkins job: ${env.BUILD_URL}\n\n
See the console output for more details: ${env.BUILD_URL}consoleFull\n\n
"""
)
}