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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With