Skip to content
[mdsadiq.xyz]
BlogNotesZines

Jenkins Refresher


Muhammad Sadiq

Muhammad Sadiq / February 20, 2025

Shell

The sh step is used to execute shell commands aor scripts within a Jenkins pipeline. It is typically written in a single-line or multi-line string inside single qoutes or double qoutes

sh 'echo $hello'
```sh

Triple qouted strings
```sh
sh """ 
```sh

- This allows you to write multi line shell scripts within a Jenkins pipeline. Inside triple qoutes, you can include newlines and it's easier to format the script cleanly across multiple lines.
Triple qouted strings can also expand variables and interpret multi line commands more conveniently without requiring special escape characters for line breaks or spaces


HomeWho am i
TwitterGitHub
FeedNewsletter