Multiple feature branches and continuous integration

前端 未结 6 1064
借酒劲吻你
借酒劲吻你 2021-02-04 02:34

I\'ve been doing some reading about continuous integration recently and there is a scenario which could occur which I don\'t understand how to deal with appropriately.

W

相关标签:
6条回答
  • 2021-02-04 02:59

    There are no feature branches in proper CI. Use feature toggles instead.

    0 讨论(0)
  • 2021-02-04 03:04

    Feature branches committing back into the mainline, and OFTEN is an essential feature of Continuous Integration. For a thorough breakdown, see This Article

    0 讨论(0)
  • 2021-02-04 03:07

    I think they mean merging mainline into the feature branch, not the other way 'round. This way, the feature branch will not deviate from mainline too much, and be kept in an easily mergeable state.

    The git folks do the same thing by rebasing feature branches on top of the master branch before submitting a feature.

    0 讨论(0)
  • 2021-02-04 03:11

    The idea explained more fully in this article is to merge from the trunk/release branch to feature branches daily, but only merge back in the other direction once a feature meets your definition of 'done'.

    Code written by one feature team will be pushed into the trunk once it's complete, and will be 'distributed' to the other teams, where conflicts can be dealt with, as part of the daily merge process.

    This doesn't go as far as satisfying Nick's desire for a version control system that can be used a backup tool, unless the changes being made are small enough that they can be committed to the feature branch within a timeframe where the the risk of losing your work is acceptable.

    I personally don't try to reintegrate code into the release branch before it's done, and although I've never really tried, I'm sure building feature toggles in for unfinished work has its own issues.

    0 讨论(0)
  • 2021-02-04 03:11

    There's now some good resources showing how to combine both CI and feature branches. Bamboo or Feature Branch Notifier are some ways to look.

    And this is another quite long article showing pros of so called distributed CI. Hereunder, one excerpt explaining the benefits:

    Distributed CI has the advantage for Continuous Deployment because it keeps a clean and stable Mainline branch that can always be deployed to Production. During a Centralized CI process, an unstable Mainline will exist if code does not integrate properly (broken build) or if there is unfinished work integrated. This works quite well with iteration release planning, but creates a bottleneck for Continuous Deployment. The direct line from developer branch to Production must be kept clean in CD, Distributed CI does this by only allowing Production ready code to be put into the Mainline.

    One thing that still can be challenging is keeping the branch build isolated so that it doesn't pollute your repository of binaries by pushing its branch builds to it. Bamboo seems to address that, but not sure it's as easy with Jenkins.

    0 讨论(0)
  • 2021-02-04 03:18

    In my experience with CI, the way that you should keep your feature branches up to date with the main line changes as others have suggested. This has been working me for several releases. If you are using subversion make sure you to merge with the merge history enable. This way when you are trying to merge your changes back to line it will only like you are merging the feature changes to line, not trying resolve conflicts which your feature might have with the main line. If you are using more advance VCS like git the first merge will be a rebase where the second will be a merge.

    There are tools that can support you to get thins done more smoothly like this Feature branches with Bamboo

    0 讨论(0)
提交回复
热议问题