Monday, June 14, 2010

GIT with CruiseControl

To get GIT to work as a plugin within cruisecontrol, you need to configure like this:

<plugin name="git" classname="net.sourceforge.cruisecontrol.sourcecontrols.Git" />

This is not obvious when looking here:
http://jpablobr.com/php-staging-environment-for-continuous-integration-part-2/

The resulting config.xml file will look like this:


<cruisecontrol>
<project name="socialgo" buildafterfailed="true">

<listeners>
<currentbuildstatuslistener file="logs/${project.name}/status.txt"/>
</listeners>

<modificationset quietperiod="60">
<git localWorkingCopy="projects/${project.name}/source/"/>
</modificationset>

<plugin name="git" classname="net.sourceforge.cruisecontrol.sourcecontrols.Git" />

<bootstrappers>
<antbootstrapper anthome="apache-ant-1.7.0" buildfile="projects/${project.name}/build.xml" target="build" />
</bootstrappers>

<schedule interval="300">
<ant anthome="apache-ant-1.7.0" buildfile="projects/${project.name}/build.xml"/>
</schedule>

<log>
<merge dir="projects/${project.name}/target/test-results"/>
</log>

<publishers>
<onsuccess>
<artifactspublisher dest="artifacts/${project.name}" file="projects/${project.name}/target/${project.name}.jar"/>
</onsuccess>
</publishers>

</project>
</cruisecontrol>










1 comment:

SAK said...

Hi,

Good post.

We are currently using CVS on crise control(for websphere commerce deployment).Now we decided to migrated from cvs to GIT.

Could you please let know what are the configurations that need to change on crice control...etc

Thanks.
SAK