-
New Feature
-
Resolution: Fixed
-
Major
-
None
For Windows platforms, even if I specify a "custom script", the plugin attempts to execute 'sh' with a path to my .bat file, which fails like so:
java.io.IOException: Cannot run program "sh" (in directory "C:\Program Files (x86)\Jenkins\jobs\echo_test\workspace"): CreateProcess error=2, The system cannot find the file specified
If the plugin simply added another category for Windows Batch scripts, the plugin could instead execute "cmd /c call <path/to/file.bat>".
[JENKINS-12365] Add support for managed .bat scripts for Windows
Resolution | New: Fixed [ 1 ] | |
Status | Original: Open [ 1 ] | New: Resolved [ 5 ] |
Workflow | Original: JNJira [ 142731 ] | New: JNJira + In-Review [ 190242 ] |
I don't have a windoz at hand right now, but I think this should already work if you define the very first line of your script like this:
#!cmd /c call
This works like a shebang on *nix systems and will cause the plugin to use a custom shell interpreter - in this case "cmd"
http://en.wikipedia.org/wiki/Shebang_%28Unix%29
could you have a try with this and let me know?