duanhuizhe6767 2010-04-16 02:25
浏览 62
已采纳

如何将CI(Hudson)活动同步到现有的自动构建流程(phing,svn)?

OUR CURRENT BUILD PROCESS

We're a small team of developers (2 to 4 people depending on project) who currently use Phing to deploy code to a staging environment, before going live. We keep our code in a SVN repo, where the trunk holds current active development and, at certain times, we do make branches that we test and then (if successful), tag and export to the staging env. If everything goes well there too, we finally deploy'em in production servers. Actions are highly automated, but always triggered by human intervention.


THE DOUBT

We'd now like to introduce Continuous Integration (with Hudson) in the process; unfortunately we have a few doubts about activity syncing, since we're afraid that CI could somewhat interfere with our build process and cause certain problems.

Considering that an automated CI cycle has a certain frequency of automatically executed actions, we see 2 possible cases for "integration", each with its own problems:

  1. Case A: each CI cycle produces a new branch with its own name; we do use such a name to manually (through phing as it happens now) export the code from the SVN to the staging env. The problem I see here is that (unless specific countermeasures are taken - IE deletion) the number of branches we have can easily grow out of control (let's suppose we commit often, so that we have a fresh new build/branch every N minutes).

  2. Case B: each CI cycle creates a new branch named 'current', which is then tagged with a unique name only when we manually decide to export it to staging; the current branch, at any case is then deleted, as soon as the next CI cycle starts up. The problem we see here is that a new cycle could kick in while someone is tagging/exporting the 'current' branch to staging thus creating an inconsistent build (but maybe here I'm just too pessimist, since I confess I don't know whether SVN offers some built-in protection against this).


With all this being said, I was wondering if anyone with similar experiences could be so kind to give us some hints on the subject, since none of the approaches depicted above looks completely satisfing to us.

Is there something important we just completely left off in the overall picture? Thanks for your attention & (in advance) for your help!

  • 写回答

2条回答 默认 最新

  • doulu1945 2010-06-01 19:36
    关注

    In both options you start with "each CI cycle produces a new branch". Don't do that. You want to keep your number of branches to the minimum and always under control (manually created) to avoid that your project becomes a mess. The decision of whether the development in the mainline is ready and you can produce a release candidate (branch from the trunk) is not trivial.

    CI cycles are triggered by changes in the code to ensure that the integration of those changes doesn't break the application. Therefore, you'd rather set up a project in Hudson for each active stream of development, this is, one for the mainline, one for the branch that represents the production version (for bug-fixing) and eventually one for the RC.

    Martin Fowler's article about Continuous Integration is an excellent guide to the whys and hows of CI implementation.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥20 机器学习能否像多层线性模型一样处理嵌套数据
  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来
  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效