本文介绍了CruiseControl.net远程处理-ForceBuild原因的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

CruiseControl.net附带了使用.net远程处理功能连接到CruiseControl.net服务器的功能。
我已经能够连接并实现我们所需的一切-CCtray的更高级版本。

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.

但是,可以将项目配置为询问对于buildReason,这可以通过预订ICruiseServer.ForceBuildReceived事件来实现,该事件作为参数接受一个允许返回原因的对象。

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.

通过查看服务器的源代码,我已经了解了很多。
但是,在客户端中订阅该事件,将引发RemotingException,该异常表示要在其配置文件中启用远程服务器的customErrors选项。

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?

推荐答案

原来,答案是使用BuildProjectRequest而不是ProjectRequest,因为这允许您为构建指定参数。
我使用了与Project.ListBuildParameters()调用相同的名称,并带有$前缀来匹配其他名称。

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.

感谢自动化编码器(Craig Sutherland)的这篇帖子,这为我指明了正确的方向。

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

这篇关于CruiseControl.net远程处理-ForceBuild原因的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-28 20:57