Groovy web console

subscribe to the feed Subscribe
to this
site
pipeline takes a Closure (via #groovywebconsole)
tweet this snippet Tweet
this
script

pipeline takes a Closure

Published 5 months ago by Anonymous with tags jenkins
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
def echo(x){println x}
def parallel (x){
    println x
    println x.getClass()
    }
def pipeline(goOn) {
    println "executing pipeline of type ${goOn.getClass()}"
    goOn()}

pipeline{
  parallel(
    a: {         echo "This is branch a"       },       
    b: {         echo "This is branch b"       }     )
}