我目前在 Ubuntu 18.04 上运行 Jenkins 时遇到问题。sh 管道步骤挂起并最终超时并显示以下消息:
[Pipeline] sh
process apparently never started in /var/lib/jenkins/workspace/members-only-demo@tmp/durable-494a3b0d
(running Jenkins temporarily with -Dorg.jenkinsci.plugins.durabletask.BourneShellScript.LAUNCH_DIAGNOSTICS=true might make the problem clearer)
Cannot contact : java.io.FileNotFoundException: File '/var/lib/jenkins/workspace/members-only-demo@tmp/durable-494a3b0d/output.txt' does not exist
这是线程转储:
Thread #6
at DSL.sh(completed process (code -2) in /var/lib/jenkins/workspace/members-only-demo@tmp/durable-494a3b0d; recurrence period: 15000ms; check task scheduled; cancelled? false done? false)
at WorkflowScript.run(WorkflowScript:9)
at DSL.stage(Native Method)
at WorkflowScript.run(WorkflowScript:8)
at DSL.node(running on )
at WorkflowScript.run(WorkflowScript:3)
流水线脚本如下:
#!/usr/bin/env groovy
node {
stage('Checkout') {
checkout([$class: 'GitSCM', branches: [[name: '*/da-demo']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'TeamHub2', url: '[email protected]:digitalarchitects/projects/slender-man/repositories/git/members-only-app']]])
}
stage('Create Build Dir') {
sh label: '', returnStdout: true, script: 'rm --recursive --force ${env.WORKSPACE}/build/'
sh 'mkdir --parents ${env.WORKSPACE}/build/coverage ${env.WORKSPACE}/build/logs ${env.WORKSPACE}/build/pdepend'
}
...
}
我不太确定如何解决此问题。有人可以帮忙吗?