I've been struggling with this same issue. It only seems to be a problem on Linux - Windows slaves work OK. One theory I have is that it could be related to the "Shell executable" setting in the main configuration page (Manage Jenkins->Configure System). I have the shell executable set as "bash". Do you have the same?

Eric


On 6/20/2016 2:21 PM, Mike Chmielewski wrote:
Hi all!

I have been banging my head on this for a while, and now hope the greater community can help me out. I am starting out with workflows, and almost immediately hit a snag.

I have the following setup:

Jenkins 2.7 on:

- CentOS 6.7 master
- CentOS 7.1 on agents

- Pipeline 2.1

I have the following script:

|
node ('agent_label') {
    stage 'echo'
    echo 'Hello!'
    println env.getEnvironment()
    stage 'sh'
    sh 'echo hello sh!'
}
|

When I run this job manually, the job errors out on:

|
sh 'echo hello sh!'
|

With the following error:

|
[t1]Runningshell script sh:<PATH_TO_AGENT_WORKSPACE_ROOT>/t1@tmp/durable-ae020333/script.sh:bash:bad interpreter:Nosuch file ordirectory
|

Looking in the directory listed the t1@tmp/ directory is empty. This error happens with the Groovy Sandbox setting set to true or false.

Running a freestyle job with a shell script works without issue. Has anyone seen this and possibly even resolved this?

Thanks!
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com <mailto:jenkinsci-users+unsubscr...@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/fa080423-5ce6-4b10-8749-1126fccd8c4a%40googlegroups.com <https://groups.google.com/d/msgid/jenkinsci-users/fa080423-5ce6-4b10-8749-1126fccd8c4a%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

--
*Eric Pyle
*
Release Engineer
Lebanon
+1 603-277-3060 (T)
+1 603-359-8670 (M)
eric.p...@cd-adapco.com <mailto:eric.p...@cd-adapco.com>
http://www.cd-adapco.com <http://www.cd-adapco.com>

--
You received this message because you are subscribed to the Google Groups "Jenkins 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/242e8028-558f-2f50-ea75-091b6b7d4696%40cd-adapco.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to