What if you never had to type the same commands again and still get perfect results every time?
Why Shell steps (sh, bat) in Jenkins? - Purpose & Use Cases
Imagine you have to run a series of commands on different computers manually, typing each command one by one in a terminal or command prompt.
You need to do this every time you want to build or test your software.
This manual way is slow and boring.
You might forget a command or make a typo.
It's hard to repeat the exact same steps every time, and mistakes can cause big problems.
Shell steps in Jenkins let you write those commands once in a script.
Jenkins runs them automatically on the right machine, every time, without mistakes.
This saves time and makes your work reliable.
Open terminal Type: git pull Type: ./build.sh Type: ./test.sh
sh 'git pull' sh './build.sh' sh './test.sh'
You can automate complex tasks easily and run them anytime with one click.
A developer pushes code to a shared repository.
Jenkins automatically runs shell steps to build the app and run tests without anyone typing commands.
Manual command typing is slow and error-prone.
Shell steps automate running commands in Jenkins.
This makes builds and tests fast, reliable, and repeatable.