我正在Windows 10上设置Jenkins服务器,希望能够使构建脚本更加跨平台。我希望利用Windows 10中可用的bash环境来实现这一目标。我希望只需将Jenkins中的shell路径设置为bash可执行文件即可完成此操作,但是我在尝试实现这一目标时遇到了一些问题。首先,当我将路径设置为
C:\Windows\System32\bash.exe
时,Jenkins似乎无法看到此路径。我认为这是因为Jenkins以32位运行,因此将路径更改为C:\Windows\sysnative\bash.exe
,但是当我尝试使用此路径时,出现错误。[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
我觉得我有点摸不着头脑,不知道有没有人尝试在Jenkins中使用Windows 10上的Bash Shell?