Have you tried putting #!/usr/bin/zsh at the top of your little jenkins 
build script?

I imagine the default shell for your jenkins is defined by the settings 
associated with the user that owns the jenkins process running on your unix 
system and the duplicate java entries may also be the result of that too 
(check the .bashrc or .cshrc for your user that owns the jenkins process, 
maybe someone is populating PATH excessively)

On Monday, October 3, 2016 at 1:01:08 PM UTC-7, Ashish Yadav wrote:
>
> I created a sample job in Jenkins2.0 to get the SHELL and PATH variables.
>
> Here is the console output:
>
> Started by user admin
> Building in workspace /var/lib/jenkins/workspace/path
> [path] $ /usr/bin/zsh -xe /tmp/hudson7499585998548354807.sh
> +/tmp/hudson7499585998548354807.sh:2> echo /bin/bash
> /bin/bash
> + echo 
> /usr/java/jdk1.8.0_101/bin:/usr/java/jdk1.8.0_101/bin:/sbin:/usr/sbin:/bin:/usr/bin
>
> /usr/java/jdk1.8.0_101/bin:/usr/java/jdk1.8.0_101/bin:/sbin:/usr/sbin:/bin:/usr/bin
> Finished: SUCCESS
>
>
>
>    1. What is the default shell for Jenkins. I asked for zsh but still 
>    got /bin/bash
>    2. Why am I seeing duplicate entires for JAVA? 
>    [/usr/java/jdk1.8.0_101/bin:/usr/java/jdk1.8.0_101/bin]
>
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/50efa5e3-6b6b-4d91-b147-61a44a7ae303%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to