General Discussion

General discussion on using Go including questions and tips

This is a public Discussion Area  publicRSS

Post

    Matt.V
    svn: msbuild example?
    Post posted November 3, 2008 by Matt.V
    3688 Views, 2 Comment
    Topic:
    svn: msbuild example?
    Body:
    Hello: I’m trying to get a simple task working. It is using subversion, and then a microsoft MSBuild exec step. Can a simple correct example for this scenario be posted? Two issues: —the original subversion connection worked fine with a svn:// port connection —the new location of subversion has a https:// connection, and this product gives a message stating that the authentication paramters weren’t set —where is the source code saved to on the agent machine? —how do I pass the source file folder to the exec task? —how do I set the working directory to the exec task? the xml schema for the config file complains it isn’t supported <server artifactsdir="c:\cruise-artifacts"<pipeline name="someproject" <materials <svn username="cruisecontrol" url="https://192.168.0.123:8443/svn/source/someproject/trunk/" password="cruisecontrol" / </materials <stage name="compile-code" <jobs <job name="msbuildJob" <resources <resourceMS-Build</resource </resources <tasks <exec args="/m theSolution.sln" command="C:\WINDOWS\Microsoft.NET\Framework\v3.5\msbuild.exe" / </tasks </job </jobs </stage </pipeline

    Comment

    • Jez Humble
      posted November 3, 2008 by Jez Humble

      Hey there.

      One cause of the https issue is if you are using unsigned certificates. Cruise has no way of accepting the certificates interactively, so you’ll need to log in to the Cruise agent as the user Cruise is running as, and use the subversion command line to talk to the server (an “svn log” will do) so you can accept the certificate permanently. This will cache the certificate so that when Cruise calls the subversion command line it can find it.

      The source code is checked out to a sandbox on the Cruise Agent machine – where the sandbox lives depends on your platform. For Windows it’s a subdirectory of Cruise Agent in Program Files. At present you can’t change the sandbox directory – but if your build system uses relative paths this shouldn’t be a problem.

      The exec task defaults to using the sandbox directory as its working directory. You can change the working directory using the “workingdir” attribute of the exec task. The configuration reference is here: http://studios.thoughtworks.com/cruise-continuous-integration/help/configuration_reference.html#exec
      —if that’s what you’re saying is unsupported, please confirm and I’ll log it as a bug so we can fix it for our next release (due out this month).

      Thanks,

      Jez.

    • Pete Mounce
      posted November 16, 2008 by Pete Mounce

      I used http://dotnet.org.za/cjlotz/archive/2007/04/04/part-1-continuous-integration-using-msbuild-cruisecontrol-net-fxcop-nunit-ncover-subversion.aspx as the beginning of our build process; it’s really well documented.

      I’m planning on adding to it to incorporate PUTing artifacts to Cruise so I can leverage more than a single agent and run things in parallel at some point, too. Unless someone else beats me to it and decides to blog about what they did ;-)