"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 clear - the "when" cl
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
(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*
> *
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 org.jenkinsci.plugins.workflow.cps.DSL.invokeMe