-
Bug
-
Resolution: Unresolved
-
Minor
-
Jenkins 2.42
Pipeline 2.4
workflow-cps 2.24
The following fails in pipeline scripts (the if statement always evaluates to false)
def getStatus(){ // .... "Ready" } //.... def acceptedStatuses = ["Ready", "Updated", "Failed" ] def status if(acceptedStatuses.contains((status = getStatus()))){ // never called }
[JENKINS-41422] Assignment in if statements does not work
Epic Link | New: JENKINS-35390 [ 171183 ] |
Component/s | New: workflow-cps-plugin [ 21713 ] | |
Component/s | Original: pipeline [ 21692 ] |
Labels | Original: pipeline | New: complex-cps-code pipeline triaged-2018-11 |