基本上,我有一个主作业,在该作业上并行运行其他作业。但对于其中一些我会超时。
docker run -t -d -u 1000:1000 -u root docker_image cat
17:39:17 ERROR: Timeout after 180 seconds
基本上,主要的工作groovy脚本如下所示:
node ("main"){
stage("Stage 1") {
catchError(buildResult: "SUCCESS", stageResult: "SUCCESS") {
step([$class: 'WsCleanup'])
script {
// Other operations
jobsToRun = [:]
parallel jobsToRun.collectEntries { jobName ->
["Running $jobName": {
build_job(params)
}]
}
}
}
}
}
在其他 CI 工作中我有这个:
pipeline {
agent none
stages {
stage("Stage 1") {
agent {
docker {
image "docker_image"
registryUrl "registry_url"
registryCredentialsId "creds1"
alwaysPull true
args "-u root --network web"
}
}
steps {
// Other operations
}
}
}
}
有办法防止这种超时吗?
你找到解决办法了吗?我也有同样的问题。