1
1
#! /usr/bin/env groovy
2
2
/* groovylint-disable DuplicateListLiteral, DuplicateNumberLiteral, DuplicateStringLiteral, NestedBlockDepth */
3
+ /* groovylint-disable VariableName */
3
4
/* Copyright (C) 2019-2022 Intel Corporation
4
5
* All rights reserved.
5
6
*
@@ -46,11 +47,13 @@ void job_status_update(String name=env.STAGE_NAME,
46
47
String key = name. replace(' ' , ' _' )
47
48
key = key. replaceAll(' [ .]' , ' _' )
48
49
if (job_status_internal. containsKey(key)) {
49
- // groovylint-disable-next-line NoDef
50
+ /* groovylint-disable-next-line NoDef, VariableTypeRequired */
50
51
def myStage = job_status_internal[key]
52
+ /* groovylint-disable-next-line Instanceof */
51
53
if (myStage instanceof Map ) {
54
+ /* groovylint-disable-next-line Instanceof */
52
55
if (value instanceof Map ) {
53
- value. each{ resultKey , data -> myStage[resultKey] = data }
56
+ value. each { resultKey , data -> myStage[resultKey] = data }
54
57
return
55
58
}
56
59
// Update result with single value
@@ -60,14 +63,16 @@ void job_status_update(String name=env.STAGE_NAME,
60
63
}
61
64
// pass through value
62
65
job_status_internal[key] = value
63
- }
66
+ }
64
67
65
68
// groovylint-disable-next-line MethodParameterTypeRequired, NoDef
66
69
void job_step_update (def value ) {
67
- if (value == null ) {
68
- value = currentBuild. currentResult
70
+ /* groovylint-disable-next-line NoDef, VariableTypeRequired */
71
+ def _value = value
72
+ if (_value == null ) {
73
+ _value = currentBuild. currentResult
69
74
}
70
- job_status_update(env. STAGE_NAME , value )
75
+ job_status_update(env. STAGE_NAME , _value )
71
76
}
72
77
73
78
// Don't define this as a type or it loses it's global scope
@@ -126,7 +131,7 @@ pipeline {
126
131
junit_files : ' *.xml non-exist*.xml' ,
127
132
failure_artifacts : env. STAGE_NAME ))
128
133
}
129
- // runTest handles SCM notification via stepResult
134
+ // runTest handles SCM notification via stepResult
130
135
} // stage('grep JUnit results tests failure case')
131
136
stage(' grep JUnit results tests error case 1' ) {
132
137
agent {
@@ -144,7 +149,7 @@ pipeline {
144
149
junit_files : ' *.xml non-exist*.xml' ,
145
150
failure_artifacts : env. STAGE_NAME ))
146
151
}
147
- // runTest handles SCM notification via stepResult
152
+ // runTest handles SCM notification via stepResult
148
153
} // stage('grep JUnit results tests error case 1')
149
154
stage(' grep JUnit results tests error case 2' ) {
150
155
agent {
@@ -162,7 +167,7 @@ pipeline {
162
167
junit_files : ' *.xml non-exist*.xml' ,
163
168
failure_artifacts : env. STAGE_NAME ))
164
169
}
165
- // runTest handles SCM notification via stepResult
170
+ // runTest handles SCM notification via stepResult
166
171
} // stage('grep JUnit results tests error case 2')
167
172
stage(' publishToRepository RPM tests' ) {
168
173
when {
@@ -267,7 +272,7 @@ pipeline {
267
272
junit_files : null ,
268
273
failure_artifacts : env. STAGE_NAME ))
269
274
}
270
- // runTest handles SCM notification via stepResult
275
+ // runTest handles SCM notification via stepResult
271
276
} // stage('provisionNodes with release/0.9 Repo')
272
277
stage(' provisionNodes with master Repo' ) {
273
278
when {
@@ -293,7 +298,7 @@ pipeline {
293
298
junit_files : null ,
294
299
failure_artifacts : env. STAGE_NAME ))
295
300
}
296
- // runTest handles SCM notification via stepResult
301
+ // runTest handles SCM notification via stepResult
297
302
} // stage('provisionNodes with master Repo')
298
303
stage(' provisionNodes with slurm EL8' ) {
299
304
when {
@@ -321,7 +326,7 @@ pipeline {
321
326
junit_files : null ,
322
327
failure_artifacts : env. STAGE_NAME ))
323
328
}
324
- // runTest handles SCM notification via stepResult
329
+ // runTest handles SCM notification via stepResult
325
330
} // stage('provisionNodes with slurm EL8')
326
331
stage(' provisionNodes with slurm Leap15' ) {
327
332
when {
@@ -347,7 +352,7 @@ pipeline {
347
352
junit_files : null ,
348
353
failure_artifacts : env. STAGE_NAME ))
349
354
}
350
- // runTest handles SCM notification via stepResult
355
+ // runTest handles SCM notification via stepResult
351
356
} // stage('provisionNodes_with_slurm_leap15')
352
357
stage(' Commit Pragma tests' ) {
353
358
steps {
@@ -386,7 +391,7 @@ pipeline {
386
391
// skipStage(commit_msg: cm))
387
392
assert(skipStage(commit_msg : cm) == commit. skips[i])
388
393
i++
389
- }
394
+ }
390
395
}
391
396
cachedCommitPragma(clear : true )
392
397
}
@@ -448,7 +453,7 @@ pipeline {
448
453
// assert() is pretty lame
449
454
// println('assert(' + parseStageInfo()['test_tag'] + " == ${cmp})")
450
455
assert(parseStageInfo()[' test_tag' ] == cmp)
451
- }
456
+ }
452
457
}
453
458
}
454
459
}
@@ -549,7 +554,7 @@ pipeline {
549
554
parameters : [string(name : ' TestTag' ,
550
555
value : ' load_mpi test_core_files test_pool_info_query' ),
551
556
string(name : ' CI_RPM_TEST_VERSION' ,
552
- value : cachedCommitPragma(' Test-skip-build' , ' true ' ) == ' true' ?
557
+ value : cachedCommitPragma(' Test-skip-build' , ' false ' ) == ' true' ?
553
558
daosLatestVersion(env. TEST_BRANCH ) : ' ' ),
554
559
booleanParam(name : ' CI_UNIT_TEST' , value : false ),
555
560
booleanParam(name : ' CI_FI_el8_TEST' , value : true ),
0 commit comments