I do not know how that has happened. I'm just saying that's what the symptoms 
look like. Maybe it is not your fault at all? Maybe the script that starts 
Jenkins was written by someone else? Or maybe I'm wrong?

You could easily check by open a web browser to your Jenkins and clicking on 
the link "Manage Jenkins" and then "System info" or just go to 
$JENKINS_URL/systemInfo

On the page search for "Environment Variables" and check what is the value for 
PATH. Usually it should be something like /usr/bin:/bin:/usr/sbin:/sbin.

The order in which you see the commands printed (and prefixed by '+' sign) is 
correct. When you ask shell to execute a pipeline, shell must start the 
processes of the pipeline from right to left. If it would start them from left 
to right, some of the processes might try to write to a pipe no-one is reading.

-- Sami

Jim McCaskey kirjoitti 28.6.2012 kello 22.10:

> I wonder how I would accomplish that by just upgrading Jenkins?  So are you 
> saying that the order that I see those in the error report has no meaning as 
> well?  I have noticed a number of SSH related issues in the last several 
> Jenkins releases.  I wonder if I just have a regression here.
> 
> -Jim
> 
> -----Original Message-----
> From: jenkinsci-users@googlegroups.com 
> [mailto:jenkinsci-users@googlegroups.com] On Behalf Of Sami Tikka
> Sent: Thursday, June 28, 2012 1:49 PM
> To: jenkinsci-users@googlegroups.com
> Subject: Re: SSH not executing commands in the correct order
> 
> It looks like you have somehow managed to remove the PATH environment 
> variable.
> 
> -- Sami
> 
> Jim McCaskey <jim.mccas...@pervasive.com> kirjoitti 28.6.2012 kello 18.33:
> 
>> Hello all,
>> 
>> I upgraded to Jenkins 1.472 from 1.461 (I think it was 1.461) and have 
>> noticed a problem with my SSH agents.  I have a freestyle project set up 
>> that issues this command after the source gets checked out:
>> 
>> sh build.sh 10.2.5.SNAPSHOT 2>&1 | tee build.log
>> 
>> However, I am getting an error like this:
>> 
>> [projectName.aix] $ /bin/sh -xe /tmp/hudson55308.sh
>> + tee build.log
>> + sh build.sh 10.2.5.SNAPSHOT
>> + 2>& 1
>> /tmp/hudson55308.sh[2]: tee:  not found.
>> Build step 'Execute shell' marked build as failure
>> 
>> As you can see, it appears to be mangling the command.  So far I have 
>> noticed this on AIX 5.3, HP-UX itanium B.11.23, and Red Hat Linux 9.  
>> 
>> On my linux machine I tried removing the pipes thinking that was the problem 
>> and got this:
>> 
>> [projectName.linux32] $ /bin/sh -xe /tmp/hudson36543.sh
>> + sh build.sh 10.2.5.SNAPSHOT
>> /tmp/hudson36543.sh: line 2: sh: command not found
>> Build step 'Execute shell' marked build as failure
>> 
>> Any ideas on how to fix this?  Needless to say I'm dead in the water right 
>> now on these platforms.
>> 
>> -Jim
>> 
> 
> 

Reply via email to