Subversion with Continuous Integration

Sorry, if the answers to this question already exist, I have not found them yet.

I am a member of the web development team, we support the web portal. Release management works with Subversion. Here's how I work when adding new features to the portal:

  • Create a new branch by copying Trunk
  • Development in this thread
  • Merge updates from Trunk periodically into this branch (I want to know that Framework-Changes changes my code before it goes to UAT / Integration, for example.)
  • Reintegrate the branch into the trunk to allow it to live.

Now we have a problem with continuous integration:

  • Periodically go-live every X weeks
  • There are several Branches that plan to live at different times.
  • Every X hours a day, the Integration Server performs a Trunk check and merges all branches (which should explicitly go into the integration system) into it
  • Trunk updates that have been merged into each branch (see above) now generate tree conflicts.

What is the best practice for this? Re-Integrating does not work to merge multiple branches, because as soon as one branch is integrated, the working copy is no longer clean. However, continuous integration should be as possible ...

If Trank changes are merged into each branch, different revisions are created. But files must have the same content and be equal. Isn't there a merge option that says “ignore conflict if two new / changed files are identical”?

Thanks for any help.

+6
source share
1 answer

What you described is not continuous integration due to the following requirement:

Every X hours a day, the Integration Server checks the external line and combines all branches (which should explicitly go into the integration system) into it

Real Continuous integration includes the following steps:

  • Updating the source code from one specific branch ( trunk , for example).
  • The source code of a building that creates an assembly artifact that can be executed or deployed. Sometimes this step also includes unit tests and checks.
  • Shows the status of the assembly, whether it was successful or not: green or red.

If you have several branches, this means that you need to set up several build plans for several branches in order to perform continuous integration for each branch separately.

Therefore, there can be no best practice for what you described, because mergers should always be done manually. This is due to merge conflicts. They occur quite often and can only be resolved manually. Continuous integration will not help.

If you just get confused with the conditions and want to fulfill everything that you described, I would say that your development process is a bit spoiled. You may not need to merge multiple branches at the same time. All the development that you perform most often should be concentrated in one branch. Most often, this "one" branch will be a chest.

In your case, it seems that valuable development is scattered between several branches. This is not true. As soon as you decide that some features should be included in the upcoming release, it should be integrated into one (possibly parent) branch and remain there as part of the code base. Try to reduce the number of branches you have.

Summarizing,

  • Exclude the merge all branches step from your process (this should not be done automatically).
  • Instead, manually merge.
  • If you are sure that you need to have branches all the time, configure continuous integration for each individual branch separately.
  • Otherwise (you do not need to constantly maintain branches, and after development is complete, they can be easily reintegrated into the parent branch). Reduce the number of branches to a minimum.

Good luck

+5
source

Source: https://habr.com/ru/post/907847/


All Articles