Overview - Shell steps (sh, bat)
What is it?
Shell steps in Jenkins allow you to run command-line scripts during your automated build or deployment process. The 'sh' step runs shell commands on Unix-like systems, while the 'bat' step runs batch commands on Windows. These steps let Jenkins interact with the operating system to perform tasks like compiling code, running tests, or managing files.
Why it matters
Without shell steps, Jenkins would be limited to only built-in functions and plugins, making automation less flexible. Shell steps let you use any command-line tool or script, unlocking the full power of your system. This means faster, more customized automation that fits your exact needs, saving time and reducing errors.
Where it fits
Before learning shell steps, you should understand basic Jenkins pipelines and how automation works. After mastering shell steps, you can explore advanced pipeline scripting, error handling, and integrating other tools like Docker or Kubernetes.