【发布时间】:2016-06-24 08:25:08
【问题描述】:
可以使用以下方式指定克隆超时:
git {
...
cloneTimeout(60)
}
其中 60 是超时是分钟。我读到也可以指定结帐超时,但我找不到详细信息。 checkoutTimeout(...) 和 timeout(...) 都会报错。
编辑
我可以通过 Jenkins GUI 设置结帐超时时间(Configuration --> SCM --> Git --> Additional Behaviors --> Advanced Checkout Behaviors --> Timeout)。我想在为 Jenkins 生成 Docker 配置的 Groovy 脚本中做同样的事情:
...
public class DockerJob {
...
multiscm {
git {
remote {
url(...)
branch(...)
...
}
shallowClone()
cloneTimeout(60)
// Add "checkout timeout" here...
}
...
}
...
}
...
【问题讨论】:
-
您是否在询问如何通过 Jenkins UI 在作业配置中执行此操作?
标签: jenkins jenkins-plugins jenkins-job-dsl