To use a templatable string, where variables are substituted into a string, use double quotes.
sh "echo $some_var"
More Related Contents:
- How do you load a groovy file and execute it
- How can I trigger another job from a jenkins pipeline (jenkinsfile) with GitHub Org Plugin?
- Show a Jenkins pipeline stage as failed without failing the whole job
- Is it possible to create parallel Jenkins Declarative Pipeline stages in a loop?
- How to access parameters in a Parameterized Build?
- How to manipulate the build result of a Jenkins pipeline job (back to ‘SUCCESS’)?
- How do I make a Jenkins job start after multiple simultaneous upstream jobs succeed?
- Is it possible to capture the stdout from the sh DSL command in the pipeline
- Strange variable scoping behavior in Jenkinsfile
- “Build Periodically” with a Multi-branch Pipeline in Jenkins
- Jenkinsfile Declarative Pipeline defining dynamic env vars
- How to write Pipeline to discard old builds?
- How to add a timeout step to Jenkins Pipeline
- Jenkins dynamic declarative pipeline parameters
- How to invoke a jenkins pipeline A in another jenkins pipeline B
- How to differentiate build triggers in Jenkins Pipeline
- Determine Failed Stage in Jenkins Declarative Pipeline
- Get absolute path to workspace directory in Jenkins Pipeline plugin
- How to trigger a jenkins build on specific node using pipeline plugin?
- Jenkins scripted pipeline or declarative pipeline
- Abort current build from pipeline in Jenkins
- How to implement Post-Build stage using Jenkins Pipeline plug-in?
- Closures in Groovy not capturing outside variables
- How to list all `env` properties within jenkins pipeline job?
- Jenkins Pipeline Job with file parameter
- How do I pass variables between stages in a declarative Jenkins pipeline?
- Can I create dynamically stages in a Jenkins pipeline?
- Running stages in parallel with Jenkins workflow / pipeline
- How to read properties file from Jenkins 2.0 pipeline script
- Hiding password in Jenkins pipeline script