getting started with pipelines - attempting to use sh returns 'script.sh: not found'

90 views
Skip to first unread message

dan...@gradecam.com

unread,
Jun 27, 2017, 2:40:31 PM6/27/17
to Jenkins Users
Hi Folks,

Just getting started with Jenkins Pipelines, following the tutorial found here:


When I attempt to run any commands via 'sh', I get an error saying 'not found'. For example, in my pipeline script, I simply have "sh('ls')" which returns:

[Pipeline] sh
[pipeline_test] Running shell script
sh: 1: /home/jenkins/workspace/pipeline_test@tmp/durable-fa8ef8f6/script.sh: not found

I don't know what the problem is here, any tips/help is appreciated!

//Daniel


dan...@gradecam.com

unread,
Jun 27, 2017, 3:01:00 PM6/27/17
to Jenkins Users
Poked around in the mailing list and found the solution:

The 'Manage Jenkins' > 'Configure system' > 'Shell Executable' setting had been incorrectly set to just 'bash' instead of an absolute path. I just left the field blank and let Jenkins determine the shell. Works now!
Reply all
Reply to author
Forward
0 new messages