詹金斯的路径git Windows主/ Linux的奴隶 [英] Jenkins path to git Windows master / Linux slave

查看:165
本文介绍了詹金斯的路径git Windows主/ Linux的奴隶的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



git客户端插件配置为固定的git路径为C:\Program文件(x86)\git\bin\git.exe



我现在已经创建了一个Linux奴隶,但是当我在那里运行一项工作时,它试图运行命令C:\程序文件(x86)\git\bin\git.exe init,并显然失败。



这个简单的解决方案?我想我已经通过修改Windows主服务器上的PATH来解决它,并且固定的git路径现在只是git,因此可以在两个操作系统上使用。



是否正确的方式来解决这个詹金斯,或者有另一种/更好的方式来做到这一点?



谢谢。

确保所有奴隶和主人的道路上的混帐是一个好方法。

然而Jenkins可以安装多个git(对于其他工具如true,对于jdk,groovy等)

您可以通过



点击添加Git并提供新的不同名称和路径的git



这种方法具有积极的副作用。它将允许你使用不同的git客户端版本(比如测试)。

I have a Jenkins master on Windows which runs some Windows builds.

The git client plugin in configured with a fixed path to git as "C:\Program Files (x86)\git\bin\git.exe"

I've now created a Linux slave, but when I run a job on there, it's trying to run the command "C:\Program Files (x86)\git\bin\git.exe init", and obviously fails.

Is there a simple solution to this? I think I've resolved it already by modifying PATH on the Windows master, and the fixed path to git is now just "git" so would work on both OSs.

Is the "correct" way to resolve this for Jenkins, or is there another/better way to do this?

Thanks.

解决方案

Ensuring "git" in the path of all slaves and master is one good way.

However Jenkins can have multiple installation of git (true for other tools such as jdk, groovy...)

You can configure this from http://server-url/configure

Click on "Add Git" and provide new git with different name and path

You can then "select which git to use" in the "jobs" configuration.

This approach has a positive side effect. It will allow you to use different git client versions (say for testing)

这篇关于詹金斯的路径git Windows主/ Linux的奴隶的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆