jenkins - jenkins pipeline groovy waitFor 执行命令,每5分钟超时一次
问题描述
下面是我的代码片段,每次执行5分钟,jenkins就会超时报错:</p>
script{
def autotest_cmd = ["/usr/script/jenkins-autotest.py"].execute()
autotest_cmd.waitFor()
def autotest_cmd_output = autotest_cmd.in.text
def autotest_cmd_status = autotest_cmd.exitValue()
if (autotest_cmd_status == 0) {
println "${autotest_cmd_output}"
}
}
以下是jenkins的错误信息:</p>
java.lang.InterruptedException
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:502)
at java.lang.UNIXProcess.waitFor(UNIXProcess.java:396)
at sun.reflect.GeneratedMethodAccessor1581.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
at
解决方案
推荐阅读
- r - 图形问题方程:`stat_poly_eq()` 中的计算失败:可变长度不同(为 '(weights)' 找到)
- swift - Swift / Xcode - 展开可选值
- javascript - Javascript:调用方法来填充innerHTML不起作用,该方法是一种“字符串化”而不是被解释
- excel - 如何在具有唯一颜色的列中为 Excel 中的唯一值着色格式重复项?
- routes - 如何通过手动编写的过滤器在两个网络接口之间传递数据包?
- firebase - 如何将嵌套 Firestore 集合中的更改接收到单个颤动流中?
- ssh - ssh-add: 无法添加身份 xxx 代理拒绝操作
- php - 如果函数包含在 Wordpress/PHP 的模板部分中,get_template_part() 不会将样式排入队列
- pandas - 如何按日期过滤并使用关系代数(重构)计算这些日期?
- xml - 在 Oracle 中,如何从具有多个值的 XML/CLOB 字段中提取值?