(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*
> * }*
> * }*
> * stage('3') {*
>
> * }*
> *}*
This Jenkinsfile is _not_ a Declarative Pipeline but is instead using the
Scripted Pipeline syntax.
A Declarative Pipeline *must* have a `pipeline { }` outer block, and a number
of other required sections, and `when` is only applicable within Declarative.
Otherwise you can just use normal Groovy conditionals.
See this document for more:
https://jenkins.io/doc/book/pipeline/syntax/
- R. Tyler Croy
------------------------------------------------------
Code: <
https://github.com/rtyler>
Chatter: <
https://twitter.com/agentdero>
xmpp:
rty...@jabber.org
% gpg --keyserver
keys.gnupg.net --recv-key 1426C7DC3F51E16F
------------------------------------------------------