This plugin defines a new build type to execute a shell command in a cross-platform environment.
Cross platform shell executor.
Using Jenkins built-in "Execute Windows batch command" you can run commands using the windows shell.
Using Jenkins built-in "Execute shell" you can run commands using unix shell.
If you need to run a job cross platform you cannot use the two standard executors provided by Jenkins. You need a "build step" that can be executed both in Windows and in Unix.
This plugin does exactly this: it takes a command, as the two standard build steps do, and executes it calling the correct shell depending on the operating system running on the current job executor.
It cannot translate any command! So you cannot write
because on windows rm command is not available.
You can wrap your commands in two scripts, one for windows and one for unix, each one calling the right command for the operating system:
and then call clean using an XShell build step.
To add a XShell build step
Skip to end of metadata Go to start of metadata