Jenkins on Windows 10 with Bash

5

I'm currently setting up a Jenkins server on Windows 10, in the hope of being able to make the build scripts more cross platform I was hoping to take advantage of the bash environment that is available in Windows 10.

I hoped this could be done just by setting the path to the shell in Jenkins to be the bash executable, however I've encountered some problems with trying to get this to work.

Firstly when I set the path to be C:\Windows\System32\bash.exe but Jenkins didn't seem to be able to see this path.

I assumed this was because Jenkins was running as 32-bit and changed the path to be C:\Windows\sysnative\bash.exe but when I try and use this I get the 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 poking around in the dark a bit so I didn't know if anyone had any experience of trying to use the bash shell on Windows 10 within Jenkins?

bash
jenkins
windows-10
asked on Stack Overflow Sep 6, 2016 by user3617723

2 Answers

0

The error 0x80070005 usually appears during Windows Update or by specific applications, because of the .DLL files permission being denied. Look at your permissions and then try again.

answered on Stack Overflow Nov 5, 2020 by Shaqil Ismail • edited Dec 22, 2020 by Shaqil Ismail
-1

You can run this on Windows in order to execute a bash shell script:

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

Make sure that the script is executable (chmod +x) (Only works on Windwos 10 with a linux subsystem installed)

answered on Stack Overflow Feb 4, 2017 by Denny Weinberg • edited Dec 18, 2020 by Denny Weinberg

User contributions licensed under CC BY-SA 3.0