Jenkins on Windows 10 with Bash

I am currently setting up a Jenkins server on Windows 10, hoping that you can make build scripts more cross-platform. I was hoping to take advantage of the bash environment available on Windows 10.

I was hoping this could be done by simply setting the shell path in Jenkins as the bash executable, however I ran into some problems trying to get this to work.

First, when I set the path C:\Windows\System32\bash.exe, but Jenkins did not seem to be able to see this path.

I assumed that this was because Jenkins worked as 32-bit and changed the path to C:\Windows\sysnative\bash.exe, but when I try to use it, I get an error

[workspace] $ C:\Windows\sysnative\bash.exe -xe    C:\Users\Jenkins\AppData\Local\Temp\hudson4346151084156392102.sh
Error: 0x80070005


Build step 'Execute shell' marked build as failure

I think I'm a little stinky in the dark, so I didn't know if anyone had any experience using the bash shell on Windows 10 in Jenkins?

+4
1

Windows, bash shell script:

bash -c /mnt/c/Users/$LOGNAME/Downloads/abc.sh

, script (chmod + x)

0

Source: https://habr.com/ru/post/1653802/


All Articles