Basic CC build loop for a C/C++ project in SVN?

David DL <[email protected]> Thu, 22 May 2014 19:48:54 -0400
Newsgroups gmane.comp.java.cruise-control.user
Message-ID <[email protected]>
Hi all,

I have a unix-based native code project that stored in Subversion that I'd =
like to build via CC. The project has a single master shell script that can=
 do all the build, test, and packaging steps.

There is an existing configuration, but it relies heavily on Ant. This, at =
first glance, seems weird since the Ant rules mirror a good part of the log=
ic already in the normal build script.

A lot of CC examples on the net also use Ant to drive the process. In my ca=
se are there advantages to using Ant, or is <exec> just fine?

I tried to come up with a basic "exec" build loop config. =A0The one thing =
I'm missing is the svn revert and update steps. Where exactly should that f=
it in?

Config attached below as well as (better formatted) at: http://hastebin.com=
/eyipiqezuf.xml

The goals are:

1) Build twice a day: 6am, 6pm

2) Keep 30 days of logs and artifacts

3) If build worked, run a "deploy to demo machine" script.

Can you guys sanity check what I'm trying to do here? =A0Is there a better =
way?=A0

Thank you,
David

=3D=3D=3D=3D=3D=3D

Sample config: (Ignoring dashboard, email, etc. for now)

<cruisecontrol>
<project name=3D"myproject">


<modificationset quietperiod=3D"0">
<svn localworkingcopy=3D"/home/builduser/checkouts/myproject/" username=3D"=
u" password=3D"p"/>
</modificationset>


<schedule interval=3D"60">
<exec time=3D"0600"
workingdir=3D"/home/builduser/checkouts/myproject/"
command=3D"./buildproject.sh" args=3D"--cleanbuild --package --test" />

<exec time=3D"1800"
workingdir=3D"/home/builduser/checkouts/myproject/"
command=3D"./buildproject.sh" args=3D"--cleanbuild --package --test" />
</schedule>


<publishers>
<onsuccess>
<artifactspublisher dest=3D"/home/builduser/artifacts/myproject"
dir=3D"/home/builduser/checkouts/myproject/build_output" />

<execute command=3D"/home/builduser/checkouts/myproject/deploy_to_demobox.s=
h" />
</onsuccess>
</publishers>


<log dir=3D"/home/builduser/logs/myproject">
<delete every=3D"30" unit=3D"DAY" />
<deleteartifacts every=3D"30" unit=3D"DAY" />
</log>


</project>
</cruisecontrol>
 		 	   		  =

---------------------------------------------------------------------------=
---
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform availa=
ble
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs