Menghe

导航

持续编译 之 CruiseControl

CruiseControl
--Continuous Integration 概述

一、概述(参见《Continuous Integration》 by Martin Fowler and Matthew Foemmel)

    An important part of any software development process is getting reliable builds of the software. Despite it's importance, we are often surprised when this isn't done. We stress a fully automated and reproducible build, including testing, that runs many times a day. This allows each developer to integrate daily thus reducing integration problems.
    CruiseControl is a framework for a continuous build process.

二、使用

    1. Download Source/Build
    If you examine the code you just downloaded, there will be a build.bat (for Windows users) and a build.sh (for UNIX users) present in the cruisecontrol/main directory. Execute the appropriate script, and CruiseControl should compile. Look in the dist directory, and you should find a cruisecontrol.jar file if the build was successful.

    2. Create config file
    All of the cruisecontrol configuration exists in a single config file. If you're new to cruisecontrol, you'll have to create this file; please read the explanation of the config file format

    3. Startup CruiseControl
    CruiseControl can be started using two approaches:
    * Scripts. bin/cruisecontrol.bat or bin/cruisecontrol.sh.
    * Executable jar. Type the following command:
      java -jar dist/cruisecontrol.jar
    
三、配置(It is so complex that I won't go into deeply)

    CruiseControl configuration files are written in XML.
    The use of plugins means that other elements not documented here can also be used in the configuration. At a minimum, though, the config file contains a single top level <cruisecontrol> element, with one or more child <project> elements. 

    There are currently six different types of plugins that CruiseControl supports. Each has a slightly different role, but all are designed similarly. While they all implement different interfaces and have slightly different method names, we will refer to them collectively as plugins when discussing their similarities. The plugin types are:

  • Bootstrapper: run before the build
  • SourceControl: poll a code repository and determine if anything has changed
  • Builder: perform the actual building and testing of your code
  • LabelIncrementer: handles incrementing the label for you to use to tag your source
  • Publisher: publish the results of your build, via email for example
  • Listener: handles project events

posted on 2005-01-26 17:57  孟和  阅读(506)  评论(0编辑  收藏  举报