Re: Unable to use the "when" closure to skip a stage (pipeline-model-definition-plugin)

2017-02-16 Thread Baptiste Mathus
"scripted" Pipeline simply uses typical programmatic "if" construct. Declarative makes this more, well, declarative and is a bit different for readability purpose. Le 9 févr. 2017 1:52 PM, "Roi Aldaag" a écrit : > Thanks Tyler for your prompt response! > > Just to make it

Re: Unable to use the "when" closure to skip a stage (pipeline-model-definition-plugin)

2017-02-09 Thread Roi Aldaag
Thanks Tyler for your prompt response! Just to make it clear - the "when" clause is NOT supported in the Scripted Pipeline syntax and is only supported in the Declarative Pipeline Jenkinsfile? Is that explained anywhere in the documentation? Aren't those scripts interpreted eventually by the

Re: Unable to use the "when" closure to skip a stage (pipeline-model-definition-plugin)

2017-02-09 Thread R. Tyler Croy
(replies inline) On Thu, 09 Feb 2017, Roi Aldaag wrote: > for a very simple pipeline in the inline pipeline editor (not in an > external Jenkinsfile): > > *node {* > * stage('1') { // for display purposes* > > * }* > * stage('2') {* > *when {* > *//return false* > *

Unable to use the "when" closure to skip a stage (pipeline-model-definition-plugin)

2017-02-09 Thread Roi Aldaag
After updating the last pipeline plugin 2.5 and dependent plugins on latest Jenkins 2.45 we are unable to use the "when" closure: we get the following error: *java.lang.NoSuchMethodError: No such DSL method 'when' found among steps [...] at