你如何设置 Hudson 与 Git 一起工作?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/534308/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How do you set up Hudson to work with Git?
提问by Tim Visher
I'm trying to set up Hudson as a CI Server and I'm having trouble getting everything to work. I'm trying to use the 'official' git plugin. I haven't done any testing with the alternate plugin developed by stephenh.
我正在尝试将 Hudson 设置为 CI 服务器,但无法正常工作。我正在尝试使用“官方” git 插件。我还没有对 stephenh 开发的备用插件进行任何测试。
I'm wondering if anyone else has gotten Hudson to work with Git or any CI server to work with Git. If so, how and with what configuration.
我想知道是否还有其他人让 Hudson 使用 Git 或任何 CI 服务器使用 Git。如果是这样,如何以及使用什么配置。
Pertinent information is that I'm on Hudson 1.277, I'm using Git 1.6.1.1.230.gdfb04, and the Git Plugin 0.5, all on the windows platform.
相关信息是,我使用的是 Hudson 1.277,我使用的是 Git 1.6.1.1.230.gdfb04 和 Git 插件 0.5,所有这些都在 Windows 平台上。
Thanks in advance!
提前致谢!
采纳答案by Manfred Moser
With the upcoming 2.1. release Hudson will have the git plugin as part of the default install. Even now the git plugin works like a charm.
随着即将到来的 2.1。发布 Hudson 会将 git 插件作为默认安装的一部分。即使是现在 git 插件也像魅力一样工作。
In a nutshell you configure your git installation in the global configuration and then specify repo url and branch in the project config.
简而言之,您在全局配置中配置 git 安装,然后在项目配置中指定 repo url 和分支。
Check out the Hudson book for more information on how to configure things and such.
查看 Hudson 书籍,了解有关如何配置事物等的更多信息。
http://www.simpligility.com/2011/06/hudson-book-changes-and-community/
http://www.simligility.com/2011/06/hudson-book-changes-and-community/
Update: The book is now available at http://wiki.eclipse.org/The_Hudson_Book
更新:这本书现在可以在http://wiki.eclipse.org/The_Hudson_Book 上找到
回答by Richard
Git plugin for Hudson checkout problem
found that on my travels, thought it might help you out
发现在我的旅行中,认为它可以帮助你
回答by user76143
My experience with the Hudson git plugin 0.5 on Linux has been very positive. It works great.
我在 Linux 上使用 Hudson git 插件 0.5 的体验非常好。它工作得很好。
My experience with the Hudson git plugin 0.5 on Windows has been consistently negative. I encountered Hudson bug 2762, "/ is added to path of clone destination, Windows won't clone to that destination"
我在 Windows 上使用 Hudson git 插件 0.5 的体验一直是负面的。我遇到了 Hudson错误 2762,“/ 被添加到克隆目标的路径,Windows 不会克隆到该目标”
When I switched to the Hudson git plugin pre-release 0.6 from stephenh (on Windows), I was able to use git on Windows with Hudson.
当我从 stephenh(在 Windows 上)切换到 Hudson git 插件预发布 0.6 版时,我能够在 Windows 上使用 Hudson 上的 git。
Stephen Haberman's improvements are mentioned at kernel trap. I confirmed that his target/git.hpi works in my Hudson version 1.290 installation. I believe it is located at http://github.com/stephenh/hudson-git2/
在kernel trap中提到了 Stephen Haberman 的改进。我确认他的 target/git.hpi 在我的 Hudson 1.290 版安装中工作。我相信它位于http://github.com/stephenh/hudson-git2/
There is a surprising message when Hudson 1.290 starts with Stephen's plugin. Hudson reports:
当 Hudson 1.290 以 Stephen 的插件启动时,有一个令人惊讶的消息。哈德森报道:
Mar 10, 2009 7:57:36 AM hudson.util.RobustReflectionConverter doUnmarshal WARNING: Cannot convert type hudson.util.DescribableList to type hudson.model.Hudson$CloudList Mar 10, 2009 7:57:36 AM hudson.util.RobustReflectionConverter doUnmarshal WARNING: Skipping a non-existent field repositories com.thoughtworks.xstream.converters.reflection.NonExistentFieldException: No such field hudson.plugins.git.GitSCM.repositories
However, even with those messages, I was still able to clone my repository. I haven't done detailed testing yet, but preliminary results look promising.
然而,即使有这些消息,我仍然能够克隆我的存储库。我还没有做过详细的测试,但初步结果看起来很有希望。