与 Hudson 和 Mercurial 持续集成
我正在尝试找出设置新流程的最佳方法,并希望获得一些反馈:
我们正在使用 Mercurial 和 Hudson 来实现 CI 目的。 我领导着一个由多名开发人员组成的团队。
现在,当票进来时,我将它们分配给适当的开发人员,他们检查主干并进行更改。
我的目录结构如下:
PROJECT/bugfixes
现在,我的开发人员当前将他们的修复克隆到 PROJECT/bugfixes/bugticket (这是经过适当更改的 PROJECT 的克隆)
在本周末,我可以查看错误修复并看到几个错误单目录,我想将其中一些(我选择我想要的)合并到发布版本中:
PROJECT/releasebuild
我将项目克隆到发布版本中,然后拉下我想要的错误单并将它们合并到其中。
我开始与 Hudson 一起玩,我想它将更好地服务于我的目的。
现在,我的问题是:
我如何设置 Hudson 来执行上述任务?我认为我的开发人员应该使用分支而不是 PROJECT/bugfixes/bugtickets 目录。这是正确的吗?
对于我想要导入的每个分支,我应该为该特定分支创建一个新的 Hudson 项目吗? Hudson 的 Mercurial 插件似乎只接受一个分支。
我应该有更好的方法吗?
I am trying to figure out the best way to set our new process and would love to get some feedback:
We are using Mercurial and Hudson for CI purposes.
I am leading a team with several developers.
Now, when tickets come in, I assign them to their appropriate developers who check out trunk and make their changes.
I have my directory structure as follows:
PROJECT/bugfixes
Now, my developers currently clone their fixes to PROJECT/bugfixes/bugticket (this is a clone of PROJECT with the appropriate changes)
At the end of the week, I can look in bugfixes and see several bugtickets directory and I would like to merge some of the them (I choose which ones I want) into a release build:
PROJECT/releasebuild
I clone PROJECT into releasebuild and I pull down the bugtickets I want and merge them in.
I started playing with Hudson and I think it will serve my purposes better.
So now, my questions:
How can I set up Hudson to perform the above task? I think my developers should use branches rather than the directory of PROJECT/bugfixes/bugtickets. Is this correct?
For each branch I want to import, should I create a new Hudson project for that particular branch? It looks like the Mercurial plugin for Hudson only accepts one branch.
Is there a better way I should do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
也许最简单的方法是为每个分支机构设置一个 hudson 工作。在之前的项目中,我实际上发现不使用 hudson Mercurial 插件更容易。相反,我设置了一个项目(仅适用于默认分支),该项目执行了
hg purge
(以删除不属于存储库的任何工件),然后执行hg pull
(来自主存储库),然后是hg update default
。然后它就完成了构建。我在存储库中设置了一个 Mercurial 钩子,每当一个或多个变更集提交到存储库时,它都会使用 hudson CLI 触发 hudson 构建。
当然,从那时起事情可能已经发生了变化 - 我已经大约两年没有考虑 hudson/hg 集成了。
这是我使用的钩子 - 将其更新到最新版本的 hudson 或 jenkins,或者处理多个分支应该相当简单。
Probably the easiest way is to set up a hudson job per-branch. On a previous project, I actually found it was easier not to use the hudson mercurial plugin. Instead, I set up a project (for the default branch only) which did a
hg purge
(to remove any artifacts that were not part of the repository) then ahg pull
(from the master repo) followed byhg update default
. Then it did the build.I set up a mercurial hook in the repository that triggered a hudson build using the hudson CLI any time that one or more changesets were committed to the repository.
Of course, things may have changed since then - I haven't looked at the hudson/hg integration for about 2 years.
Here's the hook I used - it should be fairly simple to update it to the latest version of hudson or jenkins, or to handle multiple branches.