Issue
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?
Solution
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.
Answered By - Jonathan Wong
Answer Checked By - Clifford M. (JavaFixing Volunteer)