Groovy web console

subscribe to the feed Subscribe
to this
site
shell_issue (via #groovywebconsole)
tweet this snippet Tweet
this
script

shell_issue

Published 2 months ago by yash with tags groovy jenkins
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
// a is accessible globally in the Jenkinsfile
a = 20 
// b is only accessible inside this script block
def b = 22
sh "echo a is $a"
sh "echo b is $b"