Details
-
New Feature
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
None
Description
I'm trying to think of uses for when expression that I can kill off (death to Scripted and all that), and the most common I've seen is something like foo == 'bar' - i.e., comparing a variable and a value. So let's add a new when condition, tentatively named equals, that does that.
Code changed in jenkins
User: Andrew Bayer
Path:
pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/EqualsConditional.java
pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/EqualsConditional/help-actual.html
pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/EqualsConditional/help-expected.html
pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/EqualsConditional/help.html
pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/when/impl/EqualsConditionalScript.groovy
pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/WhenStageTest.java
pipeline-model-definition/src/test/resources/when/whenEquals.groovy
http://jenkins-ci.org/commit/pipeline-model-definition-plugin/758b597b5adfbc1eeab7032ea0073cbe041ccd71
Log:
[FIXED JENKINS-49226] Add equals condition.