Re: CruiseControl build loop for a C/C++ project?

David DL <[email protected]> Tue, 3 Jun 2014 12:29:53 -0400
Newsgroups gmane.comp.java.cruise-control.user
Message-ID <[email protected]>
Hi all,


[*bump*]


I'm trying to grok the CruiseControl config system.

>From reading the docs, I think a have a basic design, but I still have a few questions.


Please see:

https://gist.github.com/anonymous/4f30f8cdf2141128b79b


The goals are:


 - Build twice a day: 6am, 6pm
 - Keep 30 days of logs and artifacts
 - If build worked, run a "deploy to demo machine" script.


But, I have a few questions:


1) Is the "modificationset" on line 6/7 just noticing what files (if any) are changed in the svn repo used by that working copy _without_ doing any actual local updates?


2) If #1 above is true, where should the svn update happen?  As part of the "exec"d script?


3) On lines 11-19, did I get the "schedule" and "exec" elements correct? It seems weird that I need to repeat the command twice. 

Thank you again,

David


----------------------------------------
> From: [email protected]
> To: [email protected]
> Subject: Basic CC build loop for a C/C++ project in SVN?
> Date: Thu, 22 May 2014 19:48:54 -0400
>
> 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 logic already in the normal build script.
>
> A lot of CC examples on the net also use Ant to drive the process. In my case are there advantages to using Ant, or is <exec> just fine?
>
> I tried to come up with a basic "exec" build loop config. The one thing I'm missing is the svn revert and update steps. Where exactly should that fit 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? Is there a better way?
>
> Thank you,
> David
>
> ======
>
> Sample config: (Ignoring dashboard, email, etc. for now)
>
> <cruisecontrol>
> <project name="myproject">
>
>
> <modificationset quietperiod="0">
> <svn localworkingcopy="/home/builduser/checkouts/myproject/" username="u" password="p"/>
> </modificationset>
>
>
> <schedule interval="60">
> <exec time="0600"
> workingdir="/home/builduser/checkouts/myproject/"
> command="./buildproject.sh" args="--cleanbuild --package --test" />
>
> <exec time="1800"
> workingdir="/home/builduser/checkouts/myproject/"
> command="./buildproject.sh" args="--cleanbuild --package --test" />
> </schedule>
>
>
> <publishers>
> <onsuccess>
> <artifactspublisher dest="/home/builduser/artifacts/myproject"
> dir="/home/builduser/checkouts/myproject/build_output" />
>
> <execute command="/home/builduser/checkouts/myproject/deploy_to_demobox.sh" />
> </onsuccess>
> </publishers>
>
>
> <log dir="/home/builduser/logs/myproject">
> <delete every="30" unit="DAY" />
> <deleteartifacts every="30" unit="DAY" />
> </log>
>
>
> </project>
> </cruisecontrol>
> 		 	   		  
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech