3

In a cruise control configuration file, I use a set of parallel tasks to call some NAnt targets. I noticed that the CC system parameters (like CCNetBuildDate) are not pushed to the NAnt scripts, while they are pushed when I remove the parallel flag. How can I push the CCNetBuildDate information to my parallel tasks?

JL74Naves
  • 31
  • 1
  • Sounds like problem with how parallel was implemented. What parallel NAnt tasks are you talking about? The ones from CIFactory? If yes, then unfortunately that code is long dead. – skolima Sep 13 '12 at 13:10
  • I am using the tasks in the CruiseControl configuration files, that call a set of targets. – JL74Naves Sep 19 '12 at 21:25
  • My mistake, didn't know such functionality existed: http://www.cruisecontrolnet.org/projects/ccnet/wiki/Parallel_Task Could you please log a bug with CruiseControl.Net then? That's clearly a bug. – skolima Sep 19 '12 at 22:46
  • Thanks. I opened the following bug in CruiseControl.NET: http://www.cruisecontrolnet.org/issues/201 – JL74Naves Sep 22 '12 at 01:15

1 Answers1

1

When I tested this (1.5) I got 0001-01-01 for CCNetBuildDate.

Until this bug is fixed you could save the correct settings before executing the parallel tasks. As you can not override properties passed on the command line you would have to change their names or use <exec> to call nant directly:

    <nant>
        <buildFile>SaveCCNetParameters.build</buildFile>
     </nant>
     <parallel>
       <tasks>
         <exec>
            <executable>$(NAntExePath)</executable>
            <buildArgs>-buildfile:Build1.build @CCNetBuildParameters</buildArgs>
         </exec>
         <exec>
            <executable>$(NAntExePath)</executable>
            <buildArgs>-buildfile:Build2.build @CCNetBuildParameters</buildArgs>
         </exec>
       </tasks>
     </parallel>

where CCNetBuildParameters is a file looking similar to:

-DCCNetBuildDate=2012-11-10
-DCCNetBuildTime=12:12:12
-DCCNetLabel=123
[...]
Lothar
  • 860
  • 6
  • 21