Note: Just uploaded document, need to go through and fix anything that did not convert correctly.

Building a Software Factory

Continuous Builds and Continuous Integration

Continuous integration and continuous builds are mainstay features of modern software factories.
Continuous integration is the practice of development changes being tested, built, and reported in small increments during the development process. Continuous build is an extension of this practice to provide a newly tested build of the software every time a developer commits changes.

Principles of Continuous Integration

Understanding continuous integration principles, in conjunction with continuous build tools, helps drive an efficient software factory, and by extension, efficient software development. These principles include:

Developer's Role

With these principles in mind, the developer's role in the continuous integration process can be summarized as follows. Developers should:

Software Tools

Software tools can help with managing and practicing continuous integration; in fact, continuous builds are normally vastly software driven. Software considerations include:

CruiseControl

There are many different choices for continuous build software available, such as Continuum, Bamboo, and others. The continuous build software chosen here is CruiseControl, as it is open source, has a no-cost license, and is well suited for Java applications.

Overview

CruiseControl is a free continuous build software package released as open source software. It is managed by ThoughtWorks, whose employees created the original version. It is well suited for Java based projects, and some of the more notable features include:

Installing CruiseControl

NOTE: These instructions are for a Windows installation.
CruiseControl can be downloaded at the following location: http://sourceforge.net/projects/cruisecontrol/files/. At this location, there are three options available:

These instructions will concentrate on using the Windows installer. The other two options are available if a more customized installation is desired or necessary.
Once the installation file has been downloaded, executing the installer should open a window

Select all the components. Next, the installer will ask for a location. This location should have sufficient rights for read/write

Clicking install will start the installation. After the installation is complete, there should be a folder containing the program contents

Also, if you open the Local Services control panel for the machine, there should be a service named "CruiseControl Service" available that has not been started yet. Go ahead and start the service to start CruiseControl.
CruiseControl ships with a default Java project named ConnectFour. When CruiseControl starts, it will try to build this project (using Ant) and return a result. To see if this has occurred, open the CruiseControl dashboard at the following location: http://<serveraddress_or_localhost>:8080/dashboard\. The application dashboard will launch and you should see a screen like below

If the build has passed, then CruiseControl is configured and running properly in its default state.
Some troubleshooting tips if installation does not work:

Configuration Tips

As CruiseControl and Servoy are both Java driven applications, they share some Java technologies, and by default, share port configurations as well. If you plan to run CruiseControl and Servoy Application Server on the same machine, port changes will need to be made one application or the other in order for the applications to work properly.
NOTE: only one or the other needs to be modified, not both.
Changing ports for a Servoy Application Server installation is detail here (ADD LINK).
To change port configurations for CruiseControl instead, modify the wrapper.conf file found in the CruiseControl main folder. See the section below

  1. Application parameters. Add parameters as needed starting from 1
    wrapper.app.parameter.1=CruiseControlWithJetty
    wrapper.app.parameter.2=-webport
    wrapper.app.parameter.3=8080
    wrapper.app.parameter.4=-jmxport
    wrapper.app.parameter.5=8000
    wrapper.app.parameter.6=-configfile
    wrapper.app.parameter.7=config.xml
    wrapper.app.parameter.8=-rmiport
    wrapper.app.parameter.9=1099
    Note that parameter 3 and parameter 9 are conflicts with Servoy Application Server default ports. Change these ports to any other available port on the machine.

    Using CruiseControl with Servoy

    In regards to Servoy projects, CruiseControl is used to fill the following needs in our software factory

This section will describe how to configure CruiseControl to provide this functionality in our software factory.

Updating a Servoy Application Automatically

Once we have a proper .servoy file and it has passed unit testing (via our continuous build software), we would like to take it one step further and make the build available to the team for testing and use. This section talks about how to setup a Servoy Application Server to automatically import solutions.

Servoy Application Server Solution Import

At this time, there is no built in functionality to import .servoy files, nor is there any API available in the maintenance plug in for this functionality. It is possible to post to an application server and import a solution in that manner. An example solution for this has been provided at ServoyForge.
Rewrite this section for Patricks plugin