配置hudson构建多个分支

发布于 2024-08-13 11:08:04 字数 418 浏览 3 评论 0原文

我使用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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

梦里寻她 2024-08-20 11:08:04

尝试将分支放入要克隆的 URL 中,例如:

http://server/path/to/repo#newbranch

或者

ssh://user@server//path/to/repo#newbranch

您可以使用 hg help urls 查看branch-in-repo-url 的完整语法

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'.

Try putting the branch in the URL to clone like:

http://server/path/to/repo#newbranch

or

ssh://user@server//path/to/repo#newbranch

You can see the full syntax for branch-in-repo-url using 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'.
[浮城] 2024-08-20 11:08:04

克隆作业的一个问题是,一旦您点击克隆按钮,就会创建“克隆”作业。当您仍在配置克隆作业时,它可能会触发构建触发器(例如 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文