Change Windows shell in Jenkins (from Cygwin to Git Bash/msys)

后端 未结 3 474
既然无缘
既然无缘 2021-02-05 22:12

I have a Windows 7 and a Windows Server 2012 slave with the Jenkins agent and Cygwin already set up. I want to avoid Cygwin and just use the Git Bash shell that comes with Git f

3条回答
  •  悲哀的现实
    2021-02-05 22:47

    If you have only Windows agents and they all the have Git for Windows installed to the same location you can set the shell executable for all agents in the Jenkins System Configuration.

    Go to Manage Jenkins > Configure System, scroll down to Shell and set the Shell executable to point to whatever shell you want to start with the Execute shell build step.

    Here's an example how to set the shell which is installed with Git for Windows:

    Note: This won't work if you have a mixture of Windows and non-Windows agents (JENKINS-38211). It will cause similar issues if you have Windows agents where sh.exe is installed to different locations (such as a mixture of 32-bit and 64-bit Windows using the default install location for those platforms). Use this only when your environment contains only identically configured Windows nodes.

提交回复
热议问题