There are 2 different syntaxes. Declarative is the pipeline{} style. 
scripted doesn't necessarily start with node{}, but uses that heavily. 

Scripted syntax is basically a straight groovy code DSL. Use it when you 
need to do more complex and interesting things and aren't afraid to get 
down into writing code. 

Declarative syntax is a more friendly and easy-to-learn syntax. It can be 
intermingled with scripted in many ways, so I usually like to start with a 
declarative pipeline and as things start to get more complex where I have 
had to use too many script{} block or other straight groovy, then I'll 
consider scraping the declarative framework and converting to a straight 
groovy script. 


On Tuesday, October 31, 2017 at 8:37:24 AM UTC-6, Christoph Ruepprich wrote:
>
> Looking at some pipeline scripting examples, I see that there are two 
> different ways to script a pipeline. One begins with pipeline {} the other 
> with node {}. What is the difference between the two, and when would I use 
> one or the other?
>
> thanks,
> C
>

-- 
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/f444fbb1-8cc8-4c91-9641-9978268f3f7d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to