Jenkins Pipeline: running external programs with sh or bat

From within a Jenkins pipeline you can any external program. If your pipeline will run on Unix/Linux you need to use the sh command.
If your pipeline will run on MS Windows you'll need to use the bat command.

Naturally the commands you pass to these will also need to make sense on the specific operating system.

Comments

Author: Gabor Szabo

Gabor who runs the Code Maven site helps companies set up test automation, CI/CD
Continuous Integration and Continuous Deployment and other DevOps related
systems. Gabor can help your team improve the development speed and reduce the risk of bugs.