Access a Groovy variable from within shell step in Jenkins pipeline

To use a templatable string, where variables are substituted into a string, use double quotes.

sh "echo $some_var"

Leave a Comment