Cruisecontrol 失败时发布命令
我在发布当前项目状态时遇到问题。
映射:
<publishers>
<xmllogger /><!-- Log For WebDashboard ##Do not remove##-->
<email>
...
</email>
<onfailure>
<exec>
<executable>echo ERROR > logs/status.txt</executable>
</exec>
</onfailure>
</publishers>
当我想启动我的服务时,我收到以下消息:
ThoughtWorks.CruiseControl.Core.Config.ConfigurationException: 无法从配置文档实例化 CruiseControl 项目。 配置文档可能缺少正确填充 CruiseControl 配置所需的 Xml 节点。 无法加载数组项“onfailure” - 无法从 System.String 类型转换为 ThoughtWorks.CruiseControl.Core.ITask 的对象,其值为:“echo ERROR >logs/status.txt”
有谁知道该消息的含义吗?
期待
感谢亚历克斯的
I've got a problem publishing my current Project status.
Mapping:
<publishers>
<xmllogger /><!-- Log For WebDashboard ##Do not remove##-->
<email>
...
</email>
<onfailure>
<exec>
<executable>echo ERROR > logs/status.txt</executable>
</exec>
</onfailure>
</publishers>
When i want to start my Service i get the following message:
ThoughtWorks.CruiseControl.Core.Config.ConfigurationException:
Unable to instantiate CruiseControl projects from configuration document.
Configuration document is likely missing Xml nodes required for properly populating CruiseControl configuration.
Unable to load array item 'onfailure' - Cannot convert from type System.String to ThoughtWorks.CruiseControl.Core.ITask for object with value: "echo ERROR > logs/status.txt"
Does anyone know what that message means?
Thanks in anticipation
Alex
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您使用的是 CruiseControl 还是 CruiseControl.NET?
如果是CC.NET,则“onfailure”节点不存在。相反,您应该像这样使用条件发布器[1]:
您可能还需要将 echo 任务封装在 cmd 调用中:
[1] http://ccnetlive.thoughtworks.com/ccnet/doc/CCNET/Conditional%20Publisher.html
Are you using CruiseControl or CruiseControl.NET?
If CC.NET, then the "onfailure" node does not exist. Instead you should use the Conditionnal Publisher[1] like this :
You may also need to encapsulate your echo task in a cmd invokation :
[1] http://ccnetlive.thoughtworks.com/ccnet/doc/CCNET/Conditional%20Publisher.html
从文档来看,它看起来像< /code> 必须是可执行文件的名称,并且参数必须在
中传递。所以像这样的事情可能会起作用。From the documentation, it looks like
<executable>
has to be the name of the executable and the arguments must be passed in<buildArgs>
. So something like this may do the trick.