-
Notifications
You must be signed in to change notification settings - Fork 1
/
skipStage.groovy
576 lines (559 loc) · 26.3 KB
/
skipStage.groovy
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
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
/* groovylint-disable DuplicateStringLiteral, ParameterName, VariableName */
// vars/skipStage.groovy
/**
* skipStage.groovy
*
* skipStage variable
*/
/**
* Method to return true or false if a commit pragma says to skip a stage
*/
// Determine if a stage has been specified to skip with a commit pragma
String skip_stage_pragma(String stage, String def_val='false') {
return cachedCommitPragma('Skip-' + stage, def_val).toLowerCase() == 'true'
}
// Determine if a stage that defaults to being skipped has been forced to run
// (i.e. due to a commit pragma)
String run_default_skipped_stage(String stage) {
return cachedCommitPragma('Skip-' + stage).toLowerCase() == 'false'
}
boolean skip_build_on_landing_branch(String target_branch) {
if (cachedCommitPragma('Run-landing-stages') == 'true' ||
cachedCommitPragma('Run-daily-stages') == 'true') {
return false
}
return env.BRANCH_NAME != target_branch ||
quickBuild()
}
boolean skip_scan_rpms(String distro, String target_branch) {
return stageAlreadyPassed() ||
target_branch =~ branchTypeRE('weekly') ||
rpmTestVersion() != '' ||
skip_stage_pragma('scan-rpms') ||
skip_stage_pragma('scan-' + distro + '-rpms') ||
(distro == 'centos7' &&
(!paramsValue('CI_SCAN_RPMS_el7_TEST', true)) ||
skip_stage_pragma('scan-centos-rpms')) ||
docOnlyChange(target_branch) ||
quickFunctional()
}
boolean skip_ftest(String distro, String target_branch, String tags) {
// Skip the functional vm test stage if it has already passed or
// there are no tests matching the tags for the stage
if (stageAlreadyPassed() || !testsInStage(tags) ||
cachedCommitPragma('Run-GHA').toLowerCase() == 'true') {
return true
}
// Run the functional vm test stage if explicitly requested by the user
if (run_default_skipped_stage('func-test-' + distro) ||
run_default_skipped_stage('func-test-vm-all')) {
// Forced to run due to a (Skip) pragma set to false
return false
}
// If a parameter exists to enable a build, then use it.
// The params.CI_MORE_FUNCTIONAL_PR_TESTS allows enabling
// tests that are not run in PRs.
return !paramsValue('CI_FUNCTIONAL_' + distro + '_TEST', true) ||
distro in ['ubuntu20'] ||
skip_stage_pragma('build-' + distro + '-rpm') ||
skip_stage_pragma('test') ||
skip_stage_pragma('func-test') ||
skip_stage_pragma('func-test-vm') ||
skip_stage_pragma('func-test-vm-all') ||
skip_stage_pragma('func-test-' + distro) ||
(docOnlyChange(target_branch) &&
prRepos(distro) == '') ||
/* groovylint-disable-next-line UnnecessaryGetter */
(isPr() && !(distro in ['el8']))
}
boolean skip_ftest_valgrind(String distro, String target_branch, String tags) {
// Check if the default for skipping this stage been overriden
// otherwise always skip this stage (DAOS-10585)
return stageAlreadyPassed() ||
!run_default_skipped_stage('func-test-vm-valgrind') ||
!paramsValue('CI_FUNCTIONAL_' + distro + '_VALGRIND_TEST', false) ||
(skip_ftest(distro, target_branch, tags) &&
cachedCommitPragma('Run-GHA').toLowerCase() != 'true') ||
/* groovylint-disable-next-line UnnecessaryGetter */
isPr() ||
target_branch =~ branchTypeRE('weekly')
}
boolean skip_ftest_hw(String size, String target_branch, String tags) {
// Skip the functional hardware test stage if it has already passed or
// there are no tests matching the tags for the stage
if (stageAlreadyPassed() || !testsInStage(tags) ||
cachedCommitPragma('Run-GHA').toLowerCase() == 'true') {
return true
}
// Run the functional hardware test stage if explicitly requested by the user
if (run_default_skipped_stage('func-hw-test-' + size) ||
run_default_skipped_stage('func-test-hw-' + size) ||
cachedCommitPragma('Run-daily-stages').toLowerCase() == 'true') {
// Forced to run due to a (Skip) pragma set to false
return false
}
String distro = (hwDistroTarget(size) =~ /([a-z]+)(\d+)(\.\d+)?/)[0][1..2].join('')
return !paramsValue('CI_' + size.replace('-', '_') + '_TEST', true) ||
env.DAOS_STACK_CI_HARDWARE_SKIP == 'true' ||
skip_stage_pragma('build-' + distro + '-rpm') ||
skip_stage_pragma('test') ||
skip_stage_pragma('func-test') ||
skip_stage_pragma('func-test-hw') ||
skip_stage_pragma('func-test-hw-' + size) ||
skip_stage_pragma('func-hw-test') ||
skip_stage_pragma('func-hw-test-' + size) ||
startedByLanding() ||
(docOnlyChange(target_branch) &&
prRepos(distro) == '') ||
/* groovylint-disable-next-line UnnecessaryGetter */
(isPr() && size == 'medium-ucx-provider')
}
boolean skip_if_unstable() {
if (paramsValue('CI_ALLOW_UNSTABLE_TEST', false) ||
cachedCommitPragma('Allow-unstable-test').toLowerCase() == 'true' ||
env.BRANCH_NAME == 'master' ||
env.BRANCH_NAME =~ branchTypeRE('testing') ||
env.BRANCH_NAME =~ branchTypeRE('feature') ||
env.BRANCH_NAME =~ branchTypeRE('release')) {
return false
}
// Ok, it's a PR and the Allow pragma isn't set. Skip if the build is
// unstable or worse.
return currentBuild.resultIsWorseOrEqualTo('UNSTABLE')
}
boolean skip_build_on_el_gcc(String target_branch, String version) {
return paramsValue('CI_BUILD_PACKAGES_ONLY', false) ||
skip_stage_pragma('build-el' + version + '-gcc') ||
(docOnlyChange(target_branch) &&
prRepos('el' + version) == '') ||
quickFunctional()
}
boolean skip_build_bullseye(String target_branch, String distro) {
return paramsValue('CI_BUILD_PACKAGES_ONLY', false) ||
env.NO_CI_TESTING == 'true' ||
skip_stage_pragma('bullseye', 'true') ||
(docOnlyChange(target_branch) &&
prRepos(distro) == '') ||
quickFunctional()
}
/* groovylint-disable-next-line MethodSize */
boolean call(Map config = [:]) {
if (config['stage']) {
return skip_stage_pragma(config['stage'], config['def_val'])
}
if (stageAlreadyPassed(stage_name: config['stage_name'], postfix: config['axes'])) {
return true
}
String target_branch = env.CHANGE_TARGET ? env.CHANGE_TARGET : env.BRANCH_NAME
String tags = config['tags'] ?: parseStageInfo()['test_tag']
switch (env.STAGE_NAME) {
case 'Cancel Previous Builds':
return cachedCommitPragma('Cancel-prev-build') == 'false' ||
/* groovylint-disable-next-line UnnecessaryGetter */
(!isPr() && !startedByUpstream())
case 'Check Packaging':
return skip_stage_pragma('packaging-check')
case 'Lint':
return quickBuild() ||
docOnlyChange(target_branch)
case 'Pre-build':
return docOnlyChange(target_branch) ||
target_branch =~ branchTypeRE('weekly') ||
rpmTestVersion() != '' ||
quickBuild()
case 'checkpatch':
return skip_stage_pragma('checkpatch')
case 'Python Bandit check':
return skip_stage_pragma('python-bandit')
case 'Build':
// always build branch landings as we depend on lastSuccessfulBuild
// always having RPMs in it
return (env.BRANCH_NAME != target_branch) &&
skip_stage_pragma('build') ||
rpmTestVersion() != '' ||
(quickFunctional() &&
prReposContains(null, jobName()))
case 'Build RPM on CentOS 7':
return paramsValue('CI_RPM_centos7_NOBUILD', false) ||
(docOnlyChange(target_branch) &&
prRepos('centos7') == '') ||
prReposContains('centos7', jobName()) ||
skip_stage_pragma('build-centos7-rpm')
case 'Build RPM on EL 8':
case 'Build RPM on EL 8.5':
case 'Build RPM on CentOS 8':
return paramsValue('CI_RPM_el8_NOBUILD', false) ||
(docOnlyChange(target_branch) &&
prRepos('el8') == '') ||
prReposContains('el8', jobName()) ||
skip_stage_pragma('build-el8-rpm')
case 'Build RPM on EL 9':
return paramsValue('CI_RPM_el9_NOBUILD', false) ||
(docOnlyChange(target_branch) &&
prRepos('el9') == '') ||
prReposContains('el9', jobName()) ||
skip_stage_pragma('build-el9-rpm')
case 'Build RPM on Leap 15':
case 'Build RPM on Leap 15.4':
case 'Build RPM on Leap 15.5':
return paramsValue('CI_RPM_leap15_NOBUILD', false) ||
target_branch =~ branchTypeRE('weekly') ||
(docOnlyChange(target_branch) &&
prRepos('leap15') == '') ||
prReposContains('leap15', jobName()) ||
skip_stage_pragma('build-leap15-rpm')
case 'Build DEB on Ubuntu 20.04':
return paramsValue('CI_RPM_ubuntu20_NOBUILD', false) ||
paramsValue('CI_DEB_Ubuntu20_NOBUILD', false) ||
target_branch =~ branchTypeRE('weekly') ||
(docOnlyChange(target_branch) &&
prRepos('ubuntu20') == '') ||
prReposContains('ubuntu20', jobName()) ||
skip_stage_pragma('build-ubuntu20-rpm')
case 'Build on CentOS 8':
case 'Build on EL 8':
case 'Build on EL 8.8':
return skip_build_on_el_gcc(target_branch, '8')
case 'Build on CentOS 7 Bullseye':
return skip_build_bullseye(target_branch, 'centos7')
case 'Build on CentOS 8 Bullseye':
case 'Build on EL 8 Bullseye':
case 'Build on EL 8.8 Bullseye':
return skip_build_bullseye(target_branch, 'el8')
case 'Build on CentOS 7 debug':
if (run_default_skipped_stage('build-centos7-gcc-debug')) {
return false
}
return paramsValue('CI_BUILD_PACKAGES_ONLY', false) ||
(docOnlyChange(target_branch) &&
prRepos('centos7') == '') ||
quickBuild()
case 'Build on CentOS 8 debug':
case 'Build on EL 8 debug':
case 'Build on EL 8.8 debug':
return paramsValue('CI_BUILD_PACKAGES_ONLY', false) ||
skip_stage_pragma('build-centos7-gcc-debug') ||
(docOnlyChange(target_branch) &&
prRepos('el8') == '') ||
quickBuild()
case 'Build on CentOS 7 release':
return paramsValue('CI_BUILD_PACKAGES_ONLY', false) ||
skip_stage_pragma('build-centos7-gcc-release', 'true') ||
(docOnlyChange(target_branch) &&
prRepos('centos7') == '') ||
quickBuild()
case 'Build on CentOS 7':
return paramsValue('CI_BUILD_PACKAGES_ONLY', false) ||
skip_stage_pragma('build-centos7-gcc', 'false') ||
(docOnlyChange(target_branch) &&
prRepos('centos7') == '') ||
quickFunctional()
case 'Build on CentOS 8 release':
case 'Build on EL 8 release':
case 'Build on EL 8.8 release':
return paramsValue('CI_BUILD_PACKAGES_ONLY', false) ||
skip_stage_pragma('build-el8-gcc-release', 'true') ||
(docOnlyChange(target_branch) &&
prRepos('el8') == '') ||
quickBuild()
case 'Build on CentOS 7 with Clang':
case 'Build on CentOS 7 with Clang debug':
if (run_default_skipped_stage('build-centos7-clang-debug')) {
return false
}
return paramsValue('CI_BUILD_PACKAGES_ONLY', false) ||
skip_build_on_landing_branch(target_branch) ||
(docOnlyChange(target_branch) &&
prRepos('centos7') == '')
case 'Build on CentOS 8 with Clang':
case 'Build on CentOS 8 with Clang debug':
case 'Build on EL 8 with Clang':
case 'Build on EL 8.8 with Clang':
case 'Build on EL 8 with Clang debug':
case 'Build on EL 8.8 with Clang debug':
if (run_default_skipped_stage('build-el8-clang-debug')) {
return false
}
return paramsValue('CI_BUILD_PACKAGES_ONLY', false) ||
skip_build_on_landing_branch(target_branch) ||
(docOnlyChange(target_branch) &&
prRepos('el8') == '')
case 'Build on Ubuntu 20.04':
return paramsValue('CI_BUILD_PACKAGES_ONLY', false) ||
skip_build_on_landing_branch(target_branch) ||
(docOnlyChange(target_branch) &&
prRepos('ubuntu20') == '')
case 'Build on Leap 15 with Clang':
case 'Build on Leap 15.4 with Clang':
case 'Build on Leap 15.5 with Clang':
return paramsValue('CI_BUILD_PACKAGES_ONLY', false) ||
skip_build_on_landing_branch(target_branch) ||
(docOnlyChange(target_branch) &&
prRepos('leap15') == '')
/* groovylint-disable-next-line DuplicateCaseStatement */
case 'Build on CentOS 8':
case 'Build on EL 8':
return paramsValue('CI_BUILD_PACKAGES_ONLY', false) ||
skip_stage_pragma('build-el8-gcc-dev') ||
(docOnlyChange(target_branch) &&
prRepos('el8') == '') ||
quickBuild()
case 'Build on Ubuntu 20.04 with Clang':
return paramsValue('CI_BUILD_PACKAGES_ONLY', false) ||
target_branch =~ branchTypeRE('weekly') ||
skip_stage_pragma('build-ubuntu-clang') ||
(docOnlyChange(target_branch) &&
prRepos('ubuntu20') == '') ||
quickBuild()
case 'Build on Leap 15':
case 'Build on Leap 15.4':
case 'Build on Leap 15.5':
return paramsValue('CI_BUILD_PACKAGES_ONLY', false) ||
skip_stage_pragma('build-leap15-gcc') ||
(docOnlyChange(target_branch) &&
prRepos('leap15') == '') ||
quickBuild()
case 'Build on Leap 15 with Intel-C and TARGET_PREFIX':
case 'Build on Leap 15.4 with Intel-C and TARGET_PREFIX':
case 'Build on Leap 15.5 with Intel-C and TARGET_PREFIX':
return paramsValue('CI_BUILD_PACKAGES_ONLY', false) ||
target_branch =~ branchTypeRE('weekly') ||
skip_stage_pragma('build-leap15-icc') ||
(docOnlyChange(target_branch) &&
prRepos('leap15') == '') ||
quickBuild()
case 'Unit Tests':
return env.NO_CI_TESTING == 'true' ||
paramsValue('CI_BUILD_PACKAGES_ONLY', false) ||
skip_stage_pragma('build') ||
rpmTestVersion() != '' ||
docOnlyChange(target_branch) ||
skip_build_on_el_gcc(target_branch, '8') ||
skip_stage_pragma('unit-tests')
case 'NLT':
case 'NLT on CentOS 8':
case 'NLT on EL 8':
case 'NLT on EL 8.8':
return skip_stage_pragma('nlt') ||
quickBuild() ||
stageAlreadyPassed()
case 'Unit Test Bullseye':
case 'Unit Test Bullseye on CentOS 8':
case 'Unit Test Bullseye on EL 8':
case 'Unit Test Bullseye on EL 8.8':
return skip_stage_pragma('bullseye', 'true') ||
stageAlreadyPassed()
case 'Unit Test bdev with memcheck on EL 8':
case 'Unit Test bdev with memcheck on EL 8.8':
case 'Unit Test with memcheck on CentOS 8':
case 'Unit Test with memcheck on EL 8':
case 'Unit Test with memcheck on EL 8.8':
case 'Unit Test with memcheck':
return !paramsValue('CI_UNIT_TEST_MEMCHECK', true) ||
skip_stage_pragma('unit-test-memcheck') ||
stageAlreadyPassed()
case 'Unit Test':
case 'Unit Test on CentOS 8':
case 'Unit Test on EL 8':
case 'Unit Test on EL 8.8':
case 'Unit Test bdev on EL 8':
case 'Unit Test bdev on EL 8.8':
return !paramsValue('CI_UNIT_TEST', true) ||
skip_stage_pragma('unit-test') ||
skip_stage_pragma('run_test') ||
stageAlreadyPassed()
case 'Test':
return env.NO_CI_TESTING == 'true' ||
(skip_stage_pragma('build') &&
rpmTestVersion() == '') ||
skip_stage_pragma('test') ||
docOnlyChange(target_branch) ||
(env.BRANCH_NAME =~ branchTypeRE('testing') &&
!startedByTimer() &&
!startedByUpstream() &&
!startedByUser()) ||
skip_if_unstable()
case 'Test on CentOS 7 [in] Vagrant':
return skip_stage_pragma('vagrant-test', 'true') &&
!env.BRANCH_NAME =~ branchTypeRE('weekly') ||
stageAlreadyPassed()
case 'Coverity on CentOS 7':
case 'Coverity on CentOS 8':
case 'Coverity on EL 8':
case 'Coverity on EL 8.8':
case 'Coverity':
return paramsValue('CI_BUILD_PACKAGES_ONLY', false) ||
rpmTestVersion() != '' ||
skip_stage_pragma('coverity-test', 'true') ||
quickFunctional() ||
docOnlyChange(target_branch) ||
skip_stage_pragma('build')
case 'Functional on CentOS 7':
return skip_ftest('el7', target_branch, tags)
case 'Functional on CentOS 7 with Valgrind':
return skip_ftest_valgrind('el7', target_branch, tags)
case 'Functional on CentOS 8 with Valgrind':
case 'Functional on EL 8 with Valgrind':
case 'Functional on EL 8.8 with Valgrind':
return skip_ftest_valgrind('el8', target_branch, tags)
case 'Functional on CentOS 8':
case 'Functional on EL 8':
case 'Functional on EL 8.8':
return skip_ftest('el8', target_branch, tags)
case 'Functional on EL 9':
return skip_ftest('el9', target_branch, tags)
case 'Functional on Leap 15':
case 'Functional on Leap 15.4':
case 'Functional on Leap 15.5':
return skip_ftest('leap15', target_branch, tags)
case 'Functional on Ubuntu 20.04':
/* we don't do any testing on Ubuntu yet
skip_ftest('ubuntu20', target_branch, tags) */
return true
case 'Fault injection testing':
case 'Fault injection testing on CentOS 8':
case 'Fault injection testing on EL 8':
case 'Fault injection testing on EL 8.8':
return skip_stage_pragma('fault-injection-test') ||
!paramsValue('CI_FI_el8_TEST', true) ||
quickFunctional() ||
docOnlyChange(target_branch) ||
skip_stage_pragma('func-test') ||
skip_stage_pragma('func-test-vm') ||
stageAlreadyPassed()
case 'Test CentOS 7 RPMs':
return !paramsValue('CI_RPMS_el7_TEST', true) ||
target_branch =~ branchTypeRE('weekly') ||
skip_stage_pragma('test') ||
skip_stage_pragma('test-rpms') ||
skip_stage_pragma('test-centos-rpms') ||
skip_stage_pragma('test-centos-7-rpms') ||
docOnlyChange(target_branch) ||
(quickFunctional() &&
!paramsValue('CI_RPMS_el7_TEST', true) &&
!run_default_skipped_stage('test-centos-7-rpms')) ||
stageAlreadyPassed()
case 'Test CentOS 8.3.2011 RPMs':
return !paramsValue('CI_RPMS_centos8.3.2011_TEST', true) ||
target_branch =~ branchTypeRE('weekly') ||
skip_stage_pragma('test') ||
skip_stage_pragma('test-rpms') ||
skip_stage_pragma('test-centos-8.3-rpms') ||
docOnlyChange(target_branch) ||
(quickFunctional() &&
!paramsValue('CI_RPMS_el8_3_2011_TEST', true) &&
!run_default_skipped_stage('test-centos-8.3-rpms')) ||
stageAlreadyPassed()
case 'Test CentOS 8.4.2105 RPMs':
case 'Test EL 8.4 RPMs':
return !paramsValue('CI_RPMS_el8.4.2105_TEST', true) ||
target_branch =~ branchTypeRE('weekly') ||
skip_stage_pragma('test') ||
skip_stage_pragma('test-rpms') ||
skip_stage_pragma('test-el-8.4-rpms') ||
docOnlyChange(target_branch) ||
(quickFunctional() &&
!paramsValue('CI_RPMS_el8_4_TEST', true) &&
!run_default_skipped_stage('test-el-8.4-rpms')) ||
stageAlreadyPassed()
case 'Test CentOS 8.5.2111 RPMs':
case 'Test EL 8.5 RPMs':
return !paramsValue('CI_RPMS_el8.5.2111_TEST', true) ||
target_branch =~ branchTypeRE('weekly') ||
skip_stage_pragma('test') ||
skip_stage_pragma('test-rpms') ||
skip_stage_pragma('test-el-8.5-rpms') ||
docOnlyChange(target_branch) ||
(quickFunctional() &&
!paramsValue('CI_RPMS_el8_5_TEST', true) &&
!run_default_skipped_stage('test-el-8.5-rpms')) ||
stageAlreadyPassed()
case 'Test EL 8.6 RPMs':
case 'Test RPMs on EL 8.6':
return !paramsValue('CI_RPMS_el8.6_TEST', true) ||
target_branch =~ branchTypeRE('weekly') ||
skip_stage_pragma('build-el8-rpm') ||
skip_stage_pragma('test') ||
skip_stage_pragma('test-rpms') ||
skip_stage_pragma('test-el-8.6-rpms') ||
docOnlyChange(target_branch) ||
(quickFunctional() &&
!paramsValue('CI_RPMS_el8_6_TEST', true) &&
!run_default_skipped_stage('test-el-8.6-rpms')) ||
(rpmTestVersion() != '') ||
stageAlreadyPassed()
case 'Test Leap 15 RPMs':
case 'Test Leap 15.2 RPMs':
// Skip by default as it doesn't pass with Leap15.3 due to
// requiring a newer glibc
return !paramsValue('CI_RPMS_leap15_TEST', true) ||
skip_stage_pragma('build-leap15-rpm') ||
skip_stage_pragma('test-leap-15-rpms', 'true') ||
stageAlreadyPassed()
case 'Test RPMs on Leap 15.4':
return !paramsValue('CI_RPMS_leap15.4_TEST', true) ||
target_branch =~ branchTypeRE('weekly') ||
skip_stage_pragma('build-leap15-rpm') ||
skip_stage_pragma('test') ||
skip_stage_pragma('test-rpms') ||
skip_stage_pragma('test-leap-15.4-rpms', 'true') ||
docOnlyChange(target_branch) ||
(quickFunctional() &&
!paramsValue('CI_RPMS_leap15_4_TEST', true) &&
!run_default_skipped_stage('test-leap-15.4-rpms')) ||
(rpmTestVersion() != '') ||
stageAlreadyPassed()
case 'Test Packages':
return docOnlyChange(target_branch)
case 'Scan CentOS 7 RPMs':
return skip_scan_rpms('centos7', target_branch)
case 'Scan CentOS 8 RPMs':
case 'Scan EL 8 RPMs':
return skip_scan_rpms('el8', target_branch)
case 'Scan Leap 15 RPMs':
case 'Scan Leap 15.4 RPMs':
case 'Scan Leap 15.5 RPMs':
return skip_scan_rpms('leap15', target_branch)
case 'Test Hardware':
return env.NO_CI_TESTING == 'true' ||
skip_stage_pragma('func-test') ||
skip_stage_pragma('func-hw-test') ||
(skip_stage_pragma('build') &&
rpmTestVersion() == '') ||
skip_stage_pragma('test') ||
(env.BRANCH_NAME =~ branchTypeRE('testing') &&
!startedByTimer() &&
!startedByUpstream() &&
!startedByUser()) ||
skip_if_unstable()
case 'Functional_Hardware_Small':
case 'Functional Hardware Small':
return skip_ftest_hw('small', target_branch, tags)
case 'Functional_Hardware_Medium':
case 'Functional Hardware Medium':
return skip_ftest_hw('medium', target_branch, tags)
case 'Functional Hardware Medium TCP Provider':
return skip_ftest_hw('medium-tcp-provider', target_branch, tags)
case 'Functional Hardware Medium Verbs Provider':
return skip_ftest_hw('medium-verbs-provider', target_branch, tags)
case 'Functional Hardware Medium UCX Provider':
return skip_ftest_hw('medium-ucx-provider', target_branch, tags)
case 'Functional_Hardware_Large':
case 'Functional Hardware Large':
return skip_ftest_hw('large', target_branch, tags)
case 'Functional_Hardware_24':
case 'Functional Hardware 24':
return skip_ftest_hw('24', target_branch, tags)
case 'Bullseye Report':
case 'Bullseye Report on CentOS 8':
case 'Bullseye Report on EL 8':
return env.BULLSEYE == null ||
skip_stage_pragma('bullseye', 'true')
case 'DAOS Build and Test':
return skip_stage_pragma('daos-build-and-test') ||
docOnlyChange(target_branch)
default:
println("Don't know how to skip stage \"${env.STAGE_NAME}\", not skipping")
return false
}
}