1 Overview of CruiseControl
CruiseControl is a framework for a continuous integration process that includes email notifications, Ant and plug-ins for various source control tools. and provides a web interface for viewing the results of current and previous builds.
2 installation of CruiseControl
2.1 Download CruiseControl
CruiseControl is currently providing the source code, we need to create it by hand. Website: http://prdownloads.sourceforge.net/cruisecontrol/cruisecontrol-2.2.zip?download
2.2 Create the installation directory
Copy the CruiseControl source to a specific directory the directory is Install_dir, the directory has three subdirectories docs,main,reporting (note: Under Main/docs/helloworld There is an example, we can refer to. )
2.3 Setting Environment Variables
Add the Install_dir/main/bin to the system's environment variable path.
2.4 Create a working directory
Create the working directory as D:/cc-workspace, which is called Work_dir
The directory where the logs are generated during the Work_dir/logs cc build loop
Work_dir/artifacts CC generates some of the required storage during the build loop
directory where the files are located
This step is not an official blocking requirement, but a well-constructed directory structure is important for development and configuration.
3 configuration of the CruiseControl
3.1 Configuration of the reporting section
The reporting section is configured in three steps, modifies JSPs, creates override.properties, packages reporting portions of files, and deploys on WebLogic.
3.1.1 Modifying a JSP file
Modify the install_dir/reporting/jsp/buildresults.jsp file to
<%@ taglib uri= "/web-inf/cruisecontrol-jsp11.tld" prefix= "CruiseControl"%>
Revision changed to
<%@ taglib uri= "/web-inf/cruisecontrol-jsp12.tld" prefix= "CruiseControl"%>
3.1.2 Creating Override.properties
Create the Override.properties file under the install_dir/reporting/jsp directory,
The contents are as follows:
User.log.dir=d://cc-workspace//logs
User.build.status.file=status.txt
cruise.build.artifacts.dir=d://cc-workspace//artifacts
3.1.3 Packaging Web files
Executive install_dir/reporting/ JSP directory under the BUILD.bat file, after successful execution in the Dist directory to find the Cruisecontrol.war file, and deploy the file to WebLogic, WebLogic deployment Part I will not write.
3.2 Mian Partial Configuration
Mian part of the configuration is only one step, which is to create a config.
In the working directory (WORK_DIR) to create two files Congfig.xml and Startcc.bat files, the. config file is required, and the STARTCC file is optional because the Startcc.bat is purely a file created for the convenience of starting CC.
The contents of the Startcc.bat file are as follows:
Cruisecontrol-port 8000
Very short, but very convenient to use, double-click on the start CC. ;-)
Config. xml is made up of the CC rules for some of the tags, and I'm going to look at some of the usual tags and see the official documentation (INSTALL_DIR/DOC) provided by cc .
L <project/> Define a project
L <bootstrappers>
<currentbuildstatusbootstrapper file= "Logs/first/status.txt"/>
</bootstrappers>
A log file that defines the build status.
L <modificationset requiremodification= "false" quietperiod= ">"
<vss ssdir= "D:/vss/win32"//Note: There can be no spaces in ssdir
login= "Fengtianhao,fengtianhao"//user-specified, password
Vsspath= "/devtest"//project Path
Serverpath= "D:/program Files/vss"//is a directory containing Srcsafe.ini
dateformat= date format for "YY-MM-DD"//vss
timeformat= time format for "hh:mm"//vss
/>
</modificationset>
Check that the VSS file system has changed, and if so, display the changed file name on the Web page.
L <schedule interval= ">"
Define build time interval of 60 seconds
<ant buildfile= "Build.xml" antscript= "D:/ant/bin/ant.bat" target= "Deploy.app" Time= "1916" antworkingdir= "D:/ New97_prj/new97_prj "uselogger=" false ">
<jvmarg arg= "-server"/>
<jvmarg arg= "-xms64m"/>
<jvmarg arg= "-xmx256m"/>
</ant>
Specifies information about the ant. BuildFile defines the Build.xml file required for build, Antscript specifies the ant's startup script, Antworkingdir specifies the work of ant, Target specifies the goal of this build, TIME specifies the runtime of the build target, which can also be changed to