【问题标题】:hudson/jenkins keeps building the bad branch in git instead of the good onehudson/jenkins 不断在 git 中构建坏分支而不是好分支
【发布时间】:2012-01-10 14:28:00
【问题描述】:

我已经设置了 jenkins 来构建任何分支并将其合并到 master 中。我也有预接收脚本,以防止任何开发人员签入 master,除非您是用户“hudson”。

它在我们的一个存储库中运行良好,但在另一个存储库中,每当有人推送新的远程分支时,hudson 都会构建一个暂停的未工作分支并且构建失败,因此每次新推送远程分支都会触发立即构建( post-receive 脚本调用 curl) 但随后它尝试构建那个坏分支而不是开发人员推送的那个。

在日志中注意,看起来它正确检测到 dhiller-1 是最新推送的,但随后决定构建 dhiller-refactor,它不完整但保留在远程存储库中,因为它是一个仍在进行中的大型重构(并且仅出于备份目的推送)

日志...

Started by user anonymous
Checkout:workspace / C:\AAROOT\Jenkins2\jobs\toolbar\workspace - hudson.remoting.LocalChannel@aab87f
Using strategy: Default
Last Built Revision: Revision 597af7a5d808b28f492257f311af9171f03e6891 (origin/dhiller-1)
Checkout:workspace / C:\AAROOT\Jenkins2\jobs\toolbar\workspace - hudson.remoting.LocalChannel@aab87f
Fetching changes from 1 remote Git repository
Fetching upstream changes from ssh://hudson@192.168.111.130/opt/toolbar
Seen branch in repository origin/HEAD
Seen branch in repository origin/dhiller-1
Seen branch in repository origin/dhiller-2
Seen branch in repository origin/dhiller-refactor
Seen branch in repository origin/dhiller-test
Seen branch in repository origin/master
Commencing build of Revision 2c56d8645871ea2929c717e15038a5b79c0b43e1 (origin/dhiller-refactor)
Merging Revision 2c56d8645871ea2929c717e15038a5b79c0b43e1 (origin/dhiller-refactor) onto master
ERROR: Branch not suitable for integration as it does not merge cleanly
Build did not succeed and the project is configured to only push after a successful build, so no pushing will occur.
Finished: FAILURE

【问题讨论】:

    标签: git hudson jenkins


    【解决方案1】:

    好吧,我终于通过完全删除该远程分支并创建一个新分支来解决它问题......这是一个很大的痛苦,现在似乎又可以工作了。

    【讨论】:

      【解决方案2】:

      我有同样的问题。奇怪的是 Jenkins(git-plugin)发出了

      错误:分支不适合集成,因为它不能干净地合并

      消息,虽然我没有检查“构建前合并”选项集。查看 git-plugin here 的源代码,但它与该选项有关。启用该选项,保存配置,禁用该选项并再次保存配置,为我解决了这个问题;它不再尝试合并。

      【讨论】:

        猜你喜欢
        • 2013-02-27
        • 1970-01-01
        • 2014-09-19
        • 1970-01-01
        • 2011-04-20
        • 2012-08-07
        • 1970-01-01
        • 2018-01-23
        相关资源
        最近更新 更多