CruiseControl is composed of 3 main modules:
- the build loop: core of the system, it triggers build cycles then notifies various listeners (users) using various publishing techniques. The trigger can be internal (scheduled or upon changes in a SCM) or external. It is configured in a xml file which maps the build cycles to certain tasks, thanks to a system of plugins. Depending on configuration, it may produce build artifacts.
- the legacy reporting allows the users to browse the results of the builds and access the artifacts.
- the dashboard provides a visual representation of all project build statuses.
How Does Build Loop 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.
How Does Results JSP Work?
The JSP uses custom tags to handle most of its processing. This gives us a clean separation between code and content, leaving developers to modify code without worrying about page design, and designers can concentrate on modifying the layout without having to understand any Java code. All of the fonts and colors are controlled using
CSS, so that these details can be configured in an easy and centralized manner.
The build details on the right-hand side of the page are created using XSL to transform our
XML build logs created by the CruiseControl build loop into HTML that can be added into our JSP. The links on the left-hand side of the page are created by listing the files in the CruiseControl log directory. Each build log follows a naming convention so that the JSP can easily parse the directory listing into links to a particular build. The details about whether the build is running come from a text file which is written by the CruiseControl build loop at the beginning of the build and at the end of the build. This file contains a snippet of HTML which is then included in the build results
JSP.
How Does Dashboard Work?
The CruiseControl Dashboard is a powerful tool to help you visualise your project status. Project build status is colour-coded so that you can get a snapshot of how your projects are doing instantly. When you mouse-over the project builds, represented in the coloured squares, the status is shown.