持续集成颠覆
抱歉,如果这个问题的答案已经存在,我还没有找到。
我是网络开发团队的成员,我们维护一个网络门户。发布管理与 Subversion 配合使用。这就是我在向门户添加新功能时的工作方式:
- 通过复制主干来创建新分支
- 在该分支中进行开发
- 定期将来自主干的更新合并到该分支中(我想知道框架更改是否会破坏我的代码,然后再进行更改)到 UAT / 集成,例如)
- 将分支重新集成到主干中以便让它上线
现在我们在持续集成方面遇到了问题:
- 每 X 周定期上线
- 存在几个计划在不同的分支上上线的分支日期
- 每 X每天几个小时,集成服务器执行主干结帐并将所有分支(应明确地转到集成系统)合并到其中
- 已合并到每个分支(见上文)的主干更新现在生成树冲突
最佳实践是什么?重新集成不适用于合并多个分支,因为一旦一个分支被集成,工作副本就不再干净了。然而,持续集成必须以某种方式成为可能……
如果将 Trank 更改合并到每个分支中,则会创建不同的修订版本。但文件应该具有相同的内容并且相等。是否有一个合并选项说“如果两个新的/更改的文件相同,则忽略冲突”?
感谢您的任何帮助。
Sorry if answers to this question already exist, I did not find them yet.
I'm member of a web development team, we maintain a web portal. Release Management works with Subversion. This is how I work when adding new features to the portal:
- Create a new Branch by copying the Trunk
- Develop in that Branch
- Periodically merge updates from the Trunk into that Branch (I want to know if Framework-Changes break my code, before it goes to UAT / Integration, e.g.)
- Re-Integrate the Branch into the Trunk in order to let it go live
Now we have a problem with Continuous Integration:
- Periodical Go-Live every X weeks
- Several Branches exist which are planned to go-live on different dates
- Every X hours a day, Integration Server does a Trunk checkout and merges all Branches (which should explicitly go to Integration System) into it
- The Trunk updates which have been merged into each Branch (see above) now generate Tree Conflicts
What is the Best Practice for that? Re-Integrating doesn't work for merging multiple Branches, because as soon as one Branch is integrates, the working copy isn't clean anymore. However, Continuous Integration must be possible somehow...
If Trank changes are merged into each Branch, different revisions are created. But the files should have the same content and be equal. Isn't there a merge-option saying "ignore a conflict if the two new/changed files are identical"?
Thanks for any help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于以下要求,您所描述的不是持续集成:
包括以下步骤:
主干
)更新源代码。如果你有多个分支,就意味着你需要为多个分支配置多个构建计划,以便分别对每个分支进行持续集成。
因此,您所描述的内容可能没有最佳实践,因为合并应始终手动执行。这是由于合并冲突造成的。它们经常发生,只能手动解决。持续集成没有帮助。
如果您只是对术语感到困惑并且无论如何都想执行您所描述的内容,那么我会说您的开发过程有点缺陷。也许,您不需要同时从多个分支执行合并。您最常交付的所有开发都应集中在一个分支中。大多数情况下,这样的“一个”分支就是主干。
就您而言,有价值的开发似乎分散在几个分支之间。那是不对的。一旦您决定应将某些功能包含到即将发布的版本中,就应将其集成到一个(可能是父级)分支中,并作为代码库的一部分保留在那里。尝试减少您拥有的分支机构数量。
总而言之,
合并所有分支
步骤(这不会自动完成)。祝你好运!
What you described is not continuous integration because of the following requirement:
Real
Continuous integration
includes following steps:trunk
, for example).If you have several branches, it means that you need to configure several build plans for several branches in order to perform continuous integration for each branch separately.
Therefore, there could be no best practice for what you described because merges should always be performed manually. This is due to the merging conflicts. They happen quite often and can be resolved only manually. Continuous integration won't help.
If you just confused with terms and want to perform what you described anyway, I would say that your development process is little bit flawed. Probably, you do not need to perform merging from several branches simultaneously. All development you deliver most often should be concentrated in one branch. Most often such 'one' branch would be trunk.
In your case it seems that valuable development is dispersed between several branches. That's not right. Once you decide that some functionality should be included into upcoming release, it should be integrated into one (probably parent) branch and stay there as a part of the codebase. Try to reduce number of branches you have.
To sum up,
merge all branches
step from your process (this is not to be done automatically).Good luck!