0

I made a CCNET task to commit changes in a setup project after all msbuild tasks have successfully finished.

<exec executable="svn.exe">
   <description>Commit changes in the setup project file to SVN</description>
   <buildArgs>commit -m "Commmit project file after build %CCNetLabel%" -F Setup.vdproj --no-auth-cache --non-interactive --force-log</buildArgs>
</exec>

I've tried executing this command in the command prompt and it was working as expected. However, when I put the exec task in CCNET, the message recorded in SVN is completely different from what I was expecting. I keep getting something like

"DeployProject"
{
"VSVersion" = "3:800"
"ProjectType" = "8:{978C614F-708E-4E1A-B201-565925725DBA}"
"IsWebType" = "8:FALSE"
"SccLocalPath" = "8:Svn"
"SccAuxPath" = "8:Svn"
"SccProvider" = "8:SubversionScc"
......

I have no idea where the SVN exec task is getting this message. Anybody else encountered this before? How do you set the correct message? Please advice.

charlie faith
  • 13
  • 1
  • 5
  • 2
    As a general rule, you should not commit build artefacts (i.e. anything generated by the build) to the repository. – skolima Jun 03 '11 at 10:53
  • Yeah, but we needed to keep track of the latest version number generated for the setup project (msi) :( – charlie faith Jun 06 '11 at 05:24
  • Standard CruiseControl.net solution for this would be to use [tagOnSuccess](http://confluence.public.thoughtworks.org/display/CCNET/Subversion+Source+Control+Block). – skolima Jun 06 '11 at 06:52
  • We decided to remove the exec task. Thanks for the tip! =) – charlie faith Jun 09 '11 at 08:19

2 Answers2

1

Use tagOnSuccess instead, that's the supported CruiseControl.Net solution to track in svn what version has been used to generate each package.

skolima
  • 31,963
  • 27
  • 115
  • 151
0
  • Is svn.exe in path? Could it be that you're running in a service mode with different user environment?
  • Did you set the working directory properly (where are you committing from)?
Hertzel Guinness
  • 5,912
  • 3
  • 38
  • 43
  • > Is svn.exe in path? Could it be that you're running in a service mode with different user environment? Yes >Did you set the working directory properly (where are you committing from)? I've also tried that but got the same result. – charlie faith Jun 06 '11 at 05:22
  • > Could it be that you're running in a service mode with different user environment? I'm running the Cruise Control service and set the logon properties with the credentials of an admin user of our build environment. Could that be related to this problem? – charlie faith Jun 06 '11 at 05:28
  • Try running the ccnet from command line under the desired user, just to eliminate this as a possible cause. – Hertzel Guinness Jun 06 '11 at 06:12
  • Also, try using full paths in the `exec` tag to see if this is the problem – Hertzel Guinness Jun 06 '11 at 06:13