0

CruiseControl.net ships with the ability to connect to a CruiseControl.net server using .net remoting. I've been able to connect and achieve all we need - a much more advanced version of the CCtray.

However, a project can be configured to ask for a buildReason, this is fulfilled by subscribing to the ICruiseServer.ForceBuildReceived event, which as an argument takes an object which allows the reason the be returned.

http://www.opensourcejavaphp.net/csharp/cruisecontroldotnet/ICruiseServer.cs.html

this much I have figured by looking at the source code for the server. However subscribing to said event in the client, throws a RemotingException, which says to enable the remote server's customErrors option in its config file.

Has anyone else managed to achieve this? or have I got the process of providing a build reason wrong some how?

Simon Laing
  • 1,194
  • 7
  • 18
  • I haven't (managed to) edit the server.config file as yet, however I think the issue is related to marshalling the event handler from the server, i.e. sinks or serialisation – Simon Laing Jun 07 '12 at 16:57

1 Answers1

0

It turns out the answer is to use a BuildProjectRequest instead out ProjectRequest as this allows you to specify parameters for the build. I've used the same name as in the Project.ListBuildParameters() call with a $ prefix to match the others.

Any parameter which is added will appear in the build log, and is sufficient for storing a reason for the build being forced.

Thanks to Automated Coder (Craig Sutherland) for this post which helped point me in the right direction.

http://csut017.wordpress.com/2009/01/02/passing-dynamic-parameters-part-1-the-server/

Simon Laing
  • 1,194
  • 7
  • 18
  • Turns out the post has been removed, see https://web.archive.org/web/20090516002426/http://csut017.wordpress.com/2009/01/02/passing-dynamic-parameters-part-1-the-server/ – Simon Laing Dec 10 '15 at 18:12