Getting Started#830
|
|
I’ve been reading the guides and trying to understand how to set up Cruise, but I’ve encountered some problems. From my understanding, once I set up the pipeline with a SCM, Cruise will check-out the code. Once Cruise checks out the code, I’m trying to run a nant buildfile that compiles the checked-out code. Once the code is checked-out, I’m trying to run NUnit to run unit tests. My questions are: I’m sorry for asking such elementary questions and thank you for helping. |
|
|
So there are two things here… Cruise Server and Cruise Agent. For SVN, the server will never check-out the code (for Mercurial it does). The agent will always check-out the source into a sandbox (Cruise Agent\pipelines) and run your nant script from there. It doesn’t matter if this is caused by a modification or forcing the build. They work the same.
The <tasks> tag within the <job> tag are used for accessing your code. The current working directory is the root of your checked-out code, so you shouldn’t need to know where it is from a running your tests standpoint.
It will be checked out to C:\Program Files\Cruise Agent\pipelines\{pipelineName}
No. We just set the current working directory of all of the tasks (including the exec task) to be the root of the checked-out code.
There is currently no way to change where the agent checks out the code. We are looking into allowing this to be an option, but it’s not there yet.
Here is the help page dealing with publishing artifacts.
The answer to this is a little more involved. Look at my response here.
<job name="RunUnitTests">
<tasks>
<nant buildfile="nant-file-for-running-unit-tests"
target="target-for-running-unit-tests" />
</tasks>
</job>
That looks right. The configuration reference for nant can be found here. Hope this helps! If you have any other questions, just let us know. Chris |
|
|
Chris, thanks so much for your help. I’ve been able to get Cruise mostly working now. However, I am running into some problems running Cruise Agents from other machines. I have approved the agents from Cruise Server. nant will not execute anything; instead, I get a “BUILD FAILED” immediately. It appears that nant is throwing a “The directory name is invalid.” while starting up. However, if I manually run nant from the machine that Cruise Agent is running on, then everything appears fine (nant will correctly execute the tasks in the nant buildfile). Also, if I install Cruise Agent on the same machine as Cruise Server, then everything runs correctly and I get no nant errors. Any help with this is greatly appreciated. Thanks. |
