CC Build loop

From HaFrWiki42
Jump to navigation Jump to search

What is it

The Build Loop is designed to run as a daemon process which will periodically check your source control tool for changes to your codebase, build if necessary, and send out a notification regarding the status of the build.

How does it work

CruiseControl defines a build cycle - determine if a build is necessary, build, create a log file, and send notifications. The daemon process will wake up at a user defined time interval and attempt a build cycle. Each time, the configuration file will be reloaded so that the CruiseControl process need not be restarted for the changes to take effect. This is only done for known projects, so if you add or remove projects from your config file, you'll still have to restart CruiseControl to pick up the changes. At the end of the build, a log file will be written for use by the Build Results JSP.

Installing

Download and Build

After downloading the source code, look for the build.bat (Unix: build.sh in the cruisecontrol/main directory. Executing the appropriate file for building Cruise Control.

Create config fle

Create a new (or edit an existing) config.xml file. For detailed information on all commands see the file Configxml.html.
Hierarchical structure of the config.xml file

<cruisecontrol>
   <system>
      <configuration>
         <threads/>
      </configuration>
   </system>
   <plugin/>
   <project>
      <plugin/>
      <dateformat/>
      <labelincrementer/>
      <listeners>
         <currentbuildstatuslistener/>
      </listeners>
      <bootstrappers>
         <clearcasebootstrapper/>
         <currentbuildstatusbootstrapper/>
         <currentbuildstatusftpbootstrapper/>
         <cvsbootstrapper/>
         <p4bootstrapper/>
         <snapshotcmbootstrapper/>
         <starteambootstrapper/>
         <surroundbootstrapper/>
         <svnbootstrapper/>
         <vssbootstrapper/>
      </bootstrappers>
      <modificationset>
         <alwaysbuild/>
         <buildstatus/>
         <clearcase/>
         <compound>
            <targets/>
            <triggers/>
         </compound>
         <cvs/>
         <filesystem/>
         <forceonly/>
         <httpfile/>
         <mavensnapshotdependency>
         <mks/>
         <p4/>
         <pvcs/>
         <snapshotcm/>
         <starteam/>
         <surround/>
         <svn/>
         <vss/>
         <vssjournal/>
      </modificationset>
      <schedule>
         <ant/>
         <maven/>
         <pause/>
      </schedule>
      <log>
         <merge/>
      </log>
      <publishers>
         <artifactspublisher/>
         <currentbuildstatuspublisher/>
         <currentbuildstatusftppublisher/>
         <email/>
         <execute/>
         <ftppublisher/>
         <htmlemail/>
         <jabber/>
         <sametimeannouncement>
         <scp/>
         <x10>
         <xsltlogpublisher>
      </publishers>
   </project>
</cruisecontrol>

See also