具有多个非实时环境的 Mercurial 工作流程

发布于 2024-11-28 06:55:02 字数 667 浏览 0 评论 0原文

我从事的项目有 Live、RC 和 QA。当各个问题准备就绪后,质量检查团队会测试票证的功能。一旦票证通过,就可以转移到 RC。在发布之前,我们会将所有已准备好的问题放在 RC 上,以确保票证不会相互造成问题。一旦完成,所有 RC 都会搬到一起生活。

使用 Mercurial 处理此问题的好方法是什么?我们当前的流程存在一些问题。

我们当前的流程:

Live 运行默认值,RC 运行默认值(实时)创建的分支,QA 运行它自己的分支(主干),该分支是过去从默认值分支出来的。

问题从默认分支,工作,然后合并到主干。一旦票证准备好进入 RC,它就会合并到即将发布的分支中。当进行测试时,发布分支将合并到默认分支中,默认分支将合并回主干中。我们遇到的问题是,一段时间后发生了一些事情,所有的冲突都会合并到主干中。如果我们在该合并中解决与主干的冲突,它往往会更快地破坏主干,如果我们有冲突,我们会将默认值合并到我们的分支中并在该提交中解决它们。这通常有效,但几周或几个月后主干似乎坏了,我们无法再解决冲突。

更新:

我们的流程是这样的,票证 A 可能会进入 QA 环境并在那里停留一段时间。票证 B 可能会在票证 A 离开 QA 环境之前开发、移至 QA、QAed 和 RC 并发布。这不是现在可以改变的事情。我正在寻找适合我们需求的解决方案。我有能力在存储库级别影响流程的实施,但目前没有能力以显着的方式修改整个流程。

I work on a project where we have Live, RC, and QA. Individual issues go to QA when they're ready where the QA team tests the ticket's functionality. Once the ticket passes, it's ready to move to RC. Before a release we take all of the issues that are ready and put them all on RC together where we make sure that tickets don't cause problems with each other. Once that's done all of RC moves to live together.

What is a good way to handle this with Mercurial? Our current process has some problems.

Our current process:

Live runs default, RC runs a branch created off of default (live) and QA runs it's own branch (trunk) that branched from default in the past.

Issues are branched from default, worked, and then merged to trunk. Once a ticket is ready to go to RC it gets merged into the upcoming release branch. When that gets tested the release branch gets merged into default and default gets merged back into trunk. The problem we're running into is that after a while something happens and everything gets conflicts merging to trunk. If we resolve conflicts to trunk in that merge it tends to break trunk much faster, if we have conflicts we merge default into our branch and resolve them in that commit. This usually works but after a few weeks or months trunk seems to break and we can no longer resolve the conflicts.

Update:

Our process works such that ticket A might move into the QA environment and stay there for a while. Ticket B might be developed, moved to QA, QAed and on RC and released before ticket A ever leaves the QA environment. That is not something that can be changed right now. I'm looking for a solution that fits our needs. I have the ability to influence our implementation of the process at the repository level, but not the ability to modify the over all process in a significant way right now.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

停滞 2024-12-05 06:55:02

我认为您最好的选择是查看 Mercurial 建议的工作流程。我可以根据我自己的结构化发布周期经验告诉您,该周期的代码(功能、增强功能和错误修复)将进入 QA 环境进行验证和准备发布,然后从这些发布标签分支到紧急补丁,Mercurial 非常适合。

对于我下面的步骤,“主干”就是其他人可能所说的主线。 Mercurial 中没有任何术语“主干”。您只有正在使用的存储库,它要么只是您的本地存储库,要么是另一个存储库的克隆(仍然是本地的)。

  1. trunk是大家一般工作的地方。
  2. 当特定的更改完成时,它会被推送到中央服务器(仍然是主干,中央服务器是可选的,只是通过持续集成使工作流程更容易)。
  3. 从中央服务器存储库,构建完成并推送到 QA 服务器。
  4. QA 测试功能,并且通常还应该测试已知变更之外的有限交互。
  5. 如果变更通过了 QA 测试,发布经理可以选择将该变更集标记为要发布的版本号(hg tag "name of tag")。
  6. 一旦代码被标记并准备好发布,就可以进行另一个构建以推送到模拟生产配置的用户验收测试环境(UAT)。
  7. 如果 UAT 通过,则可以完成最终构建并投入生产。请注意,您可以通过使用仅保存软件的预构建副本的单独“构建”存储库来节省一些构建步骤。这样,如果 QA 和 UAT 测试通过,则在投入生产之前只需要完成一次构建。
  8. 如果在生产版本中发现缺陷,则可以使用 hg update "tag name" 然后从已发布的标记版本(例如 1.0.0)创建分支,然后使用 hgbranch "name分支”(可能应该与标签名称匹配)。
  9. 当“在”分支修订上时,修复错误,提交,并将其合并到“主干”。
  10. 从分支“上”的最新版本进行构建并将其推送到质量检查。
  11. 如果测试成功,则可以根据需要将该构建移至 UAT 和生产,并且您可以放心,您只发布了单个错误修复。

一直以来,新功能、特性和非关键错误修复都可以在“主干”中完成,继续按计划发布代码的“下一个”版本。

I think your best bet is reviewing Mercurial's suggested workflows. I can tell you from my own experience with a structured release cycle that had code (features, enhancements, and bug fixes) going to a QA environment for verification and prepping releases, then branching from those release tags for emergency patches, Mercurial fits nicely.

For my steps below, "trunk" is just what others might call mainline. There isn't any term "trunk" in Mercurial. You just have the repository you are working from, which is either just your local repository or a clone of another repository (still local).

  1. trunk is where everyone generally works.
  2. When a particular change is completed, it is pushed to a central server (still trunk and a central server is optional, just makes the workflow easier with continuous integration).
  3. From the central server repository, a build is done and pushed to the QA server.
  4. QA tests the functionality and should also generally test limited interaction outside the known change.
  5. If change passes QA testing, a release manager may choose to tag that changeset as the version number to be released (hg tag "name of tag").
  6. Once code is tagged and ready for a release, another build can be done to push to a user acceptance test environment (UAT), which mimics production configuration.
  7. If UAT passes, a final build can be done to push into production. Note that you can save some build steps by using separate "build" repositories that hold only pre-built copies of your software. That way, only a single build needs to be done if QA and UAT testing passes before pushing to production.
  8. If a defect is found in the production release, a branch can be created from the tagged revision that was released (say 1.0.0) using hg update "tag name" then hg branch "name of branch" (which should probably match the tag name).
  9. While "on" the branch revision, fix the bug, commit, merge it to "trunk".
  10. Do a build from the latest revision "on" the branch and push that to QA.
  11. If testing is successful, that build can be moved to UAT and production as necessary and you can feel confident that you are only releasing that single bug fix.

All the while, new functionality, features, and non-critical bug fixes can be done in "trunk", continuing with the "next" version of the code to be released on a schedule.

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