Tip |
---|
|
Table of Contents | ||
---|---|---|
|
The continuous build software CruiseControl is open source, has a no-cost license, and is well suited for Java applications.
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:
Info |
---|
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:
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.
Info |
---|
Only one or the other needs to be modified, not both. |
Changing ports for a Servoy Application Server installation is detailed here.
To change port configurations for CruiseControl instead, modify the wrapper.conf file found in the CruiseControl main folder. See the section below:
Code Block | ||
---|---|---|
| ||
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.
Create a folder for the software factory: c:/SoftwareFactory
Info |
---|
File structure for this folder can be found in SofwareFactory.zip |
Install CruiseControl into the c:/SoftwareFactory/CruiseControl folder. (Instructions)
This is also a good time to make configuration changes to the wrapper.conf file (Instructions) To work in this environment, we need to change and add some lines to wrapper.conf for the run directory and classpath:
Add two lines right above the wrapper.java.classpath lines in the wrapper.conf
Code Block | ||
---|---|---|
| ||
wrapper.working.dir=c:/SoftwareFactory/workArea
set.CC_INSTALL=c:/SoftwareFactory/CruiseControl |
Modify three lines as follows:
Code Block | ||
---|---|---|
| ||
wrapper.java.classpath.1=%CC_INSTALL%/lib/wrapper/*.jar
wrapper.java.classpath.2=%CC_INSTALL%/lib/*.jar
wrapper.java.library.path.1=%CC_INSTALL%/lib/wrapper |
Note | |||||
---|---|---|---|---|---|
To avoid a bug that makes the dashboard not show build status, use Java 6 instead of 7; modify the following line to point to Java 6:
|
Save the wrapper.conf file.
SVNAnt is a helper application used by ANT to update projects from the SVN. Download the application from: http://subclipse.tigris.org/files/documents/906/49042/svnant-1.3.1.zip. Extract the contents of the zip file into c:/SoftwareFactory/svnant-1.3.1
We need an installation of Servoy Developer. Install Servoy Developer with the following options set
SVNAnt works better with a command line client. Recommended: slikSVN
At this time, it is a good idea to create the workArea file structure, create a folder name workArea and build the following structure (note that some of the files needed are provided later in this document). This is where most of the work will occur during the operation. CruiseControl will be configured to run out of this folder.
Info |
---|
A zip file containing this file structure as well as example files is attached, see SoftwareFactory.zip |
Using the command line client installed, check out the solution (or solutions) from the SVN into the workspace file located at c:/SoftwareFactory/workArea/checkout/testrunner. For details on how to do this, please refer to the SVN client you have chosen.
If your SVN does not contain the solution yet, and you have the solution in a .servoy file, do the following:
As an alternative, you can use Servoy Developer to check out the solution. (NOTE: you will still need the command line client for operation of the software factory)
Info |
---|
If you are using a SSL repository, the SVN server certificate must be trusted. Otherwise, the software factory will fail. |
A file structure should be started now (example files in SoftwareFactory.zip)
A few items need to be configured at this point.
cruisecontrol.properties -- a few items in this file need to be configured for your environment
config.xml - configure the modification sets; these lines need to be configured for every solution in the workspace
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<svn localworkingcopy="${svnDir}/solution1" property="solution1_changed" /> |
cc_build.xml - this file needs to be constructed to actually run unit tests and exports. Follow the structure for the example and just modify to suit your specific situation. Keep in mind that it is design to do a unit test and export if any changes occur in any module of the main solution or the resources project. The example provided shows for two main solutions, a single module for the second solution, and a resources project.
servoy.properties - a separate properties file for any db connections used to run unit tests, as well as a repository for the unit tests.
After making any changes to properties, the CruiseControl service must be restarted. After restarting, or starting if you have not started the service, try to make a build of the project. If everything succeeds, there should be a clean .servoy file in your passed exports folder.