CruiseControl.net Remoting - ForceBuild with reason

放肆的年华 提交于 2019-12-12 04:25:31

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!