詹金斯无法识别命令 sh? [英] Jenkins does not recognize command sh?
本文介绍了詹金斯无法识别命令 sh?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在尝试让 Jenkinsfile 工作时遇到了很多麻烦.我一直在尝试运行这个测试脚本:
I've been having a lot of trouble trying to get a Jenkinsfile to work. I've been trying to run this test script:
#!/usr/bin/env groovy
node {
stage('Build') {
echo 'Building....'
// Create virtualenv
sh 'echo "hi"'
}
stage('Test') {
echo 'Building....'
}
stage('Deploy') {
echo 'Deploying....'
}
}
但是我在尝试构建时不断收到此错误:
But I keep getting this error when trying to build:
Warning: JENKINS-41339 probably bogus PATH=/usr/lib64/ccache:/usr/lib64/ccache:$PATH; perhaps you meant to use ‘PATH+EXTRA=/something/bin’?
[test-job-jenkinsfile-pipeline] Running shell script
nohup: failed to run command `sh': No such file or directory
我将所有管道插件更新到最新版本,但仍然遇到此错误.有什么帮助吗?
I updated all the pipeline plugins to the latest version and still run into this error. Any help?
推荐答案
所以看来原因是全局属性 PATH
导致了问题.通过转到 Manage Jenkins
-> Configure System
并删除 PATH
全局属性解决了我的问题.请参阅 JENKINS-41339.
So it seems the reason was that the global property PATH
was causing the issue. By going to Manage Jenkins
-> Configure System
and deleting the PATH
global property solved my issue. See JENKINS-41339.
这篇关于詹金斯无法识别命令 sh?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文