配置hudson构建多个分支
我使用ant文件通过hudson在mercurial中构建一个java项目。 mailnine 有一个 hudson 工作运行得很好。 最近创建了一个新分支并通过命令行推送到服务器:
hgbranchnewbranch
hg提交
hg push -f
主线不包含这些更改,并且仍然可以正常构建。 我已经设置了一个与主线相同设置的新作业(实际上是在哈德逊复制了主线作业),并指定了新分支。
然而,newbranch 作业构建的代码与主线相同。 如果我通过命令行克隆存储库并切换到新分支,一切都会按预期进行。这似乎是 hudson 配置故障,除非我的 merqurial 技能不正常。
我还尝试从头开始设置与主线相同的设置,并添加了 newbranch 规范,但没有任何运气。
我缺少什么? 有人有什么想法吗?
I use an ant file to build a java project in mercurial through hudson.
The mailnine has a hudson job running just fine.
Recently a new branch was created and pushed to the server by commnd line:
hg branch newbranch
hg commit
hg push -f
The mainine does not contain these changes and still builds fine.
I have set up a new job with the same setting as mainline (in fact copied mainline job in hudson), and specified the newbranch.
However, the newbranch job builds code identical to mainline.
If I commandline clone the repository and switch to the newbranch everything looks as expected. This seems to be a hudson configuration glitch unless my merqurial skills are off course.
I have also tried to set up the job from sratch with settings identical to mainline with the addition of the newbranch specification without any luck.
What am I missing?
Anyone any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试将分支放入要克隆的 URL 中,例如:
或者
您可以使用
hg help urls
查看branch-in-repo-url 的完整语法Try putting the branch in the URL to clone like:
or
You can see the full syntax for branch-in-repo-url using
hg help urls
克隆作业的一个问题是,一旦您点击克隆按钮,就会创建“克隆”作业。当您仍在配置克隆作业时,它可能会触发构建触发器(例如 SCM 轮询事件),导致它在您完全配置之前启动。
我相信这个问题在 Hudson 的更高版本中得到了修复,但找不到作业克隆的变更日志条目。克隆从配置时也存在同样的问题,该问题在 Hudson 1.319 中得到了修复。
One issue with cloning a job is that the 'cloned' job is created as soon as you hit the clone button. While you are still configuring the cloned job, it may hit a build trigger like an SCM polling event that causes it to kick off before you have fully configured it.
I believe this was fixed in later versions of Hudson, but cannot find the changelog entry for job cloning. The same issue existed for cloning a slave configuration, and the problem was fixed in Hudson 1.319.