除了停止并重新启动 CruiseControl 之外,是否有任何方法可以停止 Activity 的 CruiseControl 构建?我在跑CruiseControl Dashboard版本 2.7.2。
如果无法停止 Activity 的构建,或者如何使长时间运行的构建超时?这是我应该在 CruiseControl 中还是在 Ant 中配置的东西?
背景
看起来网络变化导致我们的一些测试用例在超时之前等待很长时间。这导致 CruiseControl 构建需要很长时间才能完成。
最佳答案
您可以配置 ant task (以及大多数其他构建任务)通过在配置中设置可选的超时属性。
Ant build will be halted if it continues longer than the specified timeout. Value in seconds.
下面的示例将在 60 秒后停止构建:
<schedule>
<ant antscript="C:\Java\apache-ant-1.6.1\bin\ant.bat"
antworkingdir="D:\workspace\MyProject"
buildfile="MyProject-nightlybuild.xml"
timeout="60"/>
<schedule>
关于java - 如何停止 CruiseControl 构建或更改配置以导致长时间运行的构建超时?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1526557/