配置hudson以构建多个分支 [英] Configure hudson to build multiple branches
问题描述
我使用ant文件通过hudson建立了一个Java项目. Mailnine的哈德逊工作运行得很好. 最近创建了一个新分支,并通过commnd行将其推送到服务器:
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分支newbranch
hg提交
hg push -f
hg branch newbranch
hg commit
hg push -f
mainine不包含这些更改,并且仍然可以正常运行.
我已经设置了与主线相同的新作业(实际上是在哈德逊复制了主线作业),并指定了新分支.
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.
但是,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.
我还试图通过添加与新分支规范相同的设置从sratch设置与主线相同的作业,而没有任何运气.
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?
推荐答案
尝试将分支放在URL中进行克隆,例如:
Try putting the branch in the URL to clone like:
http://server/path/to/repo#newbranch
或
ssh://user@server//path/to/repo#newbranch
您可以使用hg help urls
URL Paths
Valid URLs are of the form:
local/filesystem/path[#revision]
file://local/filesystem/path[#revision]
http://[user[:pass]@]host[:port]/[path][#revision]
https://[user[:pass]@]host[:port]/[path][#revision]
ssh://[user[:pass]@]host[:port]/[path][#revision]
Paths in the local filesystem can either point to Mercurial repositories
or to bundle files (as created by 'hg bundle' or 'hg incoming --bundle').
An optional identifier after # indicates a particular branch, tag, or
changeset to use from the remote repository. See also 'hg help revisions'.
这篇关于配置hudson以构建多个分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!