开发者

Manage groups of build configurations in Hudson

I'm using Hudson to build my application. I have several branches that come and go. Whenever there's a new branch, I have to set up the following builds for it:

  • a continuous build that runs after every change in SVN
  • a nightly build
  • a nightly site generation (I'm using Maven under the hood)
  • and a weekly integration build for some branches

currently this means I need to copy four template configurations and set them up with the branch URL. I don't like this for two reasons:

  • It's redundant, so modifying something is error-prone and开发者_C百科 takes a lot of time.
  • I need four full checkouts of the product per branch on every build slave, plus four separate private Maven repository, not to mention the built artifacts. This is a lot of space wasted.

What I'd like instead is to have one workspace and one configuration for allthese builds. Is this possible with Hudson?


If you go for the assumption that your nightly build is the same than your continuous build. You can publish your continuous build artifacts into a folder/repository path that contains the date. So your second and subsequent builds of a day will overwrite the previous builds of that day.

The site generation and the weekly integration build is more difficult since you would need conditional build steps. (The idea is to run batch/shell scripts that will determine if it is time for the action (like site build) and run that as part of that script).

In my opinion the better solution is to write a batch/shell script (or a Java program would work too) that copies your templates and replaces the svn entry in all your new jobs. Than you have two steps for creating a new branch. First run your script with the SVN path as the parameter and second tell Hudson to reload the configuration. The beauty of the solution is, that you can change your templates when necessary without making changes to your scripts.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜