Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins Update Syntax error: end of file unexpected (expecting ")") Execute Shell

I am getting an error when trying to run a build on my Jenkins server. The following is what the output is showing. This happened after I updated to the latest version of Jenkins. I have also verified that all plugins are up to date.

[EnvInject] - Loading node environment variables.
[workspace] $ /bin/sh -xe /tmp/hudson229576663898687231.sh
/tmp/hudson229576663898687231.sh: 1: /tmp/hudson229576663898687231.sh: Syntax error: end of file unexpected (expecting ")")
Build step 'Execute shell' marked build as failure
Finished: FAILURE

Further debugging it appears that anytime I add an execute shell build option the error is thrown. For example inside the execute shell block.

ls -al;

Also the Jenkins installation is on an Ubuntu 12.10 machine.

like image 771
wallerjake Avatar asked Mar 05 '14 17:03

wallerjake


1 Answers

After further debugging I have figured out what was happening. Jenkins use to default to

#!/bin/sh

but not appears not to default to that. I added that on top of my command script and it works just fine now.

like image 136
wallerjake Avatar answered Sep 21 '22 14:09

wallerjake