(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: [email protected]

  % gpg --keyserver keys.gnupg.net --recv-key 1426C7DC3F51E16F
------------------------------------------------------

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/20170209101121.GA26439%40blackberry.coupleofllamas.com.
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: Digital signature

Reply via email to