If you use the maven builder (recently added to cc), you will get a much better log e-mailed to you. This is also easy to implement, make sure you do a 'scm:update|clean|xxx' as build goal(s). Otherwise your sources on your build-box won't be updated...
Martijn
Martijn Dashorst wrote:
Liu, Zhihai wrote:
Thank you, Dion. I heard of CruiseControl but am reluctant to switch to itSee the 'pragmatic project automation' example chapter (can't remember the exact link now), for installing and configuring cruisecontrol.
just because of this requirement. That's why I am searching for a quick and
easy solution.
On a Windows box it is *very* simple. I had implemented this within 1 hour.
My cruisecontrol config:
<cruisecontrol>
<project name="ProjectX" buildafterfailed="false">
<bootstrappers>
<currentbuildstatusbootstrapper
file="logs/ProjectX/currentbuildstatus.txt" />
</bootstrappers>
<modificationset quietperiod="60">
<cvs localworkingcopy="checkout/ProjectX" />
</modificationset>
<schedule interval="60">
<ant buildfile="ProjectX-build.xml" target="build" />
</schedule>
<log dir="logs/ProjectX">
<merge dir="checkout/ProjectX/target/test-reports" />
</log>
<publishers>
<currentbuildstatuspublisher
file="logs/ProjectX/currentbuildstatus.txt" />
<execute command="checkbuild.bat" />
<htmlemail
mailhost="mailserver"
returnaddress="[EMAIL PROTECTED]"
defaultsuffix="@mailserver"
buildresultsurl="http://buildserver/cruisecontrol/buildresults/ProjectX"
css="d:/cruisecontrol-2.1.6/reporting/jsp/css/cruisecontrol.css"
xsldir="d:/cruisecontrol-2.1.6/reporting/jsp/xsl"
logdir="logs/ProjectX">
<always address="user1" />
<failure address="user2" reportWhenFixed="true" />
</htmlemail> </publishers>
</project>
</cruisecontrol>
<?xml version="1.0"?>
<project name="cc-build" default="build" basedir="checkout">
<target name="build">
<delete dir="ProjectX"/>
<cvs command="co ProjectX" cvsRoot=":pserver:[EMAIL PROTECTED]:d:/cvs"/>
<exec executable="maven.bat" dir="ProjectX">
<arg line="clean site:deploy"/>
</exec>
<!-- checks if 'failure' or 'error' exists in the TEST-results.xml files -->
<exec executable="checkbuild.bat" dir="d:/builds"/>
<available file="ProjectX.FAIL" filepath="d:/builds" property="build.failure"/>
<fail if="build.failure" message="Tests failed" />
</target>
</project>
My previous message uses the ant-builder for running the builds. The ant-build script runs the maven script.
If you use the maven builder (recently added to cc), you will get a much better log. This is also easy to implement, make sure you do a 'scm:update|clean|xxx' as build goal(s). Otherwise your sources on your build-box won't be updated...
Martijn
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
