Skip to content

Instantly share code, notes, and snippets.

View gianpaolof's full-sized avatar
🏍️

gianpaolo gianpaolof

🏍️
View GitHub Profile
@gianpaolof
gianpaolof / QuotesInJenkinsfiles.groovy
Created August 9, 2023 07:13 — forked from agarthetiger/QuotesInJenkinsfiles.groovy
Quoting strings and variable interpolation in Jenkinsfiles, passing values to shell tasks.
node{
timestamps{
stage('Samples'){
// Single quotes with no interpolation, at least not in Jenkins.
// The dollar variable will be evaluated before being run by the
// shell command, so variables which Jenkins makes available as
// environment variables can still be accessed from within a
// single-quoted string, passed to the sh task.
sh 'echo $PATH'