This page shall describe the process of contributing our changes into the main CruiseControl. The modified jCoderZ CruiseControl is not available to the public. But you can have a look at it's sample output.

The JCoderz CruiseControl version is based on the CruiseControl 2.3.1 version and offers various extensions to the plain CruiseControl distribution.

We need to distinguish between changes to the CruiseControl process and the web-application. Changes to the CruiseControl process application should be moved to the official release under any circumstance, whereas extensions to the web-application are eventually too project specific to be moved.

As a best-practice for dealing with changes to the web-application the original webapps folder should be put under revision control and modified step by step. When switching to a new CruiseControl version all changes can be retrieved from CVS or SVN and re-applied to the latest official version.

Show Icons and Links to project related pages on the left menu bar

Show the modification list at the top of the buildresults page

Move the following entry to the top of the list:

   &lt;p&gt;<xsl:apply-templates select="$cruisecontrol.list" mode="modifications"/>&lt;/p&gt;

Show status information for the different build steps

Link portal page section headers to WebCVS, Javadoc, JUnit, Findings-Report, etc.

WebCVS

To place a WebCVS link on the modification table header the following change must be done:

           &lt;tr&gt;
                &lt;td class="modifications-sectionheader" colspan="6"&gt;
                    &#160;Modifications since last successful build:&#160;
                    (<xsl:value-of select="count($modification.list)"/>)
                &lt;/td&gt;
           &lt;/tr&gt;
           &lt;tr>
                &lt;td class="modifications-sectionheader" colspan="6"&gt;
                    &lt;a class="modifications-sectionheader" href="<xsl:value-of select="$viewcvs.url"/>"&gt;
                    &#160;Modifications since last successful build:&#160;
                    (<xsl:value-of select="count($modification.list)"/>)
                    &lt;/a&gt;
                &lt;/td&gt;
           &lt;/tr&gt;

The WebCVS URL can be configured via the context-param 'xslt.viewcvs.url' in web.xml:

    <context-param>
      <param-name>xslt.viewcvs.url</param-name>
      <param-value>https://www.jcoderz.org/websvn/trunk</param-value>
      <description>The URL of the ViewCVS website used by cvstagdiff.xsl, checkstyle-details.xsl,
          buildresults.jsp and pmd-details.xsl
      </description>
    </context-param>

The <code>cruisecontrol.css</code> in <code>webapps/cruisecontrol/css</code> must be extended by the following entries:

   a.modifications-sectionheader { color:#FFFFFF; text-decoration: none; }
   a:hover.modifications-sectionheader { color:#FFFFFF; text-decoration: underline; }

Show only a limited number of entries for each section to keep the report small

Show a status bar for Junit/Findings-Reports

DB View (incl. Paging)

App Server Log (incl. Paging)

JCoderz-Report Integration

Files in the modifications table are URLs and point to the cvsweb URL

Colored build log, showing errors or warnings in red

Copy the file <code>buildlog.xsl</code> to folder <code>$CCHOME/webapps/cruisecontrol/xsl</code>.

   <cruisecontrol:tab name="buildLog" label="Build Log" >
      <cruisecontrol:xsl xslFile="/xsl/buildlog.xsl"/>
   </cruisecontrol:tab>

TODOs

  • Make the stylesheet detect warnings/errors that come from Ant scripts that have been forked via the Ant Exec task. Forking a sub-ant with Exec is necessary for WebSphere? builds as the WebSphere? Ant tasks require that Ant has been started via the <code>ws_ant</code> bash script which initializes the environment. The source distribution has a stylesheet in contrib/xslt which seems to do exactly what is needed here!