【发布时间】:2021-02-08 16:59:28
【问题描述】:
“mvn clean”阶段卡住了一段时间并导致以下错误:
[Pipeline] sh
process apparently never started in /home/jenkins/jenkins/workspace/<MyProject>@tmp/durable-8e4de4ec
(running Jenkins temporarily with -D
org.jenkinsci.plugins.durabletask.BourneShellScript.LAUNCH_DIAGNOSTICS=true might make the problem
clearer)
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: script returned exit code -2
Finished: FAILURE
这是我的 jenkinsfile 脚本:
pipeline{
agent{
label 'DOCKER'
}
tools {
maven 'M3'
jdk 'JAVA_HOME'
}
stages{
stage('build'){
steps{
echo 'Running Build Phase'
sh 'mvn clean'
}
}
}
}
不确定我是否需要更新任何配置。我已经用更新的 open-jdk 版本更新了 /etc/init.d/jenkins。
【问题讨论】:
-
嘿,我也遇到了类似的问题。你有什么发现吗?
-
嗨@RanaRanvijaySingh,我不确定是什么让它起作用。我关注了一些帖子,例如stackoverflow.com/questions/58346984/… 并使用 jenkins 和 docker 配置进行了很多调整。不过,我没有更新代码中的任何依赖项。这是配置的问题。
-
感谢您的回复,我的问题已解决。这是因为环境变量。这可能对其他人有帮助。 stackoverflow.com/questions/43987005/…
标签: docker jenkins jenkins-pipeline