-
Bug
-
Resolution: Unresolved
-
Minor
-
redhat linux, jenkins 2.34, Pipeline 2.5
The simplest of scripts to reproduce the issue:
switch ("triggervalue") { case "triggervalue": echo "triggervalue match" default: echo "Sorry, this does not print..." }
When no other case is triggered, then the default does seem to work.
[JENKINS-43389] switch statement default case not called if other match found in Pipeline DSL
Component/s | Original: pipeline [ 21692 ] |
Labels | Original: cps pipeline switch | New: cps switch |
Epic Link | New: JENKINS-35390 [ 171183 ] |
Assignee | New: Andrew Bayer [ abayer ] |
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |
Labels | Original: cps switch | New: complex-cps-code cps switch triaged-2018-11 |
Assignee | Original: Andrew Bayer [ abayer ] |
Try running inside @NonCPS.