简体   繁体   English

从主合并到分支-Git / Jenkins

[英]Merge from master to branch - Git/Jenkins

I am looking for a way to automate a merge from a Master branch to one or more development branches. 我正在寻找一种自动将Master分支合并到一个或多个开发分支的方法。 In other words, I want to synchronise team development branches with Master daily across multiple projects. 换句话说,我想在多个项目中每天将团队开发部门与Master同步。

I was looking into using Jenkins for this, but do not have much experience. 我一直在考虑使用Jenkins,但经验不足。 Would Jenkins provide this functionality, perhaps by adding multiple repository URLs and then specifying the "branch to merge to" in the configuration? Jenkins是否可以通过添加多个存储库URL,然后在配置中指定“合并到的分支”来提供此功能? I am less concerned about the build of the project than merging issues. 与合并问题相比,我不太关心项目的构建。 How would jenkins react to a failed merge? 詹金斯将如何应对失败的合并?

Jenkins would be ideal, but if there is another approach I would love to hear it. 詹金斯会很理想,但是如果有其他方法,我很想听听。

Many thanks in advance. 提前谢谢了。

I would strongly propose to have the dev responsible for the branch do this, as: 我强烈建议让负责该分支的开发人员执行此操作,因为:

  • A merge like this takes 10-30 seconds if there are no conflicts 如果没有冲突,则这样的合并需要10到30秒
  • If there are conflicts, the person who knows how to resolve them is right there 如果有冲突,那知道如何解决冲突的人就在那里
  • Your devs know best when to do this merge 您的开发人员最清楚何时进行合并

Why would you want to automate this in the first place? 您为什么首先要使其自动化?

I'd suggest using Gerrit to manage merges onto a common and shared workstream. 我建议使用Gerrit来管理合并到一个共享工作流上的合并。

Gerrit can be configured to use Jenkins to verify each changeset proposed for review. 可以将Gerrit配置为使用Jenkins来验证提议进行审查的每个变更集。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM