问题
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?
回答1:
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/
来源:https://stackoverflow.com/questions/10936303/cruisecontrol-net-remoting-forcebuild-with-reason