Skip to content

Commit 42fbe4f

Browse files
committed
Skip build pragma does not work
Signed-off-by: Tomasz Gromadzki <tomasz.gromadzki@hpe.com> Cancel-prev-build: false Priority: 2 Skip-python-bandit: true Skip-build-leap15-gcc: true Skip-build-leap15-icc: true Skip-unit-tests:true Skip-func-test-vm-valgrind: false Skip-func-hw-test: true
1 parent 533c9a6 commit 42fbe4f

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

Jenkinsfile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -200,20 +200,24 @@ Boolean skip_build_stage(String distro='', String compiler='gcc') {
200200
}
201201
}
202202

203-
// Skip the stage if any Skip-build-<distro>-<compiler> pragmas are true
203+
// Skip the stage if any Skip-build[-<distro>-<compiler>] pragmas are true
204204
List<String> pragma_names = ['build']
205205
if (distro && compiler) {
206206
pragma_names << "build-${distro}-${compiler}"
207-
println("pragma_name: build-${distro}-${compiler}")
208207
}
208+
Boolean skip_due_to_pragma = false
209209
pragma_names.each { name ->
210210
if (skip_pragma_set(name)) {
211-
println("[DEBUG] skip_pragma_set('${name}') == true")
212-
return true
211+
println("[${env.STAGE_NAME}] Skipping build stage due to Skip-${name} pragma")
212+
skip_due_to_pragma = true
213+
return
213214
} else {
214215
println("[DEBUG] skip_pragma_set('${name}') == false")
215216
}
216217
}
218+
if (skip_due_to_pragma) {
219+
return true
220+
}
217221
// Skip the stage if a specific DAOS RPM version is specified
218222
if (rpmTestVersion() != '') {
219223
println("[${env.STAGE_NAME}] Skipping build stage for due to specific DAOS RPM version")

0 commit comments

Comments
 (0)