Handling multiple branches in continuous integration

后端 未结 4 1783
日久生厌
日久生厌 2020-12-22 15:09

I\'ve been dealing with the problem of scaling CI at my company and at the same time trying to figure out which approach to take when it comes to CI and multiple branches. T

4条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-22 15:47

    Actually what is really problematic is build isolation with feature branches. In our company we have a set of separate maven projects all be part of a larger distribution. These projects are maintained by different teams but for each distribution all projects need to be released. A featurebranch may now overlap from one project to another and thats when build isolation gets painfully. There are several solutions we've tried:

    • create separate snapshot repositories in nexus for each feature branch
    • share local repositories on dedicated slaves
    • use the repository-server-plugin with upstream repositories
    • build all within one job with one private repository

    As a matter of fact, the last solution is the most promising. All other solutions lack in one or another way. Together with the job-dsl plugin it is easy to setup a new feature branch. simply copy and paste the groovy script, adapt branches and let the seed job create the new jobs. Make sure that the seed job removes nonmanaged jobs. Then you can easily scale with feature branches over different maven projects.

    But as tom said well above, it would be nicer to overcome the necessity of feature branches and teach devs to integrate cleanly, but that is a longer process and the outcome is not clear with many legacy system parts you won't touch any more.

    my 2 cents

提交回复
热议问题