Hi there,
I'm facing a problem with variable substitution with "Publish over SSH" plugin.
I'd like to update "$PATH" before running my commands.
But... I just can't manipulate it through a script on my remote machine.
In my .profile script, I'm updating PATH:
cat .profile
export PATH=$PATH:xxx:yyy:zzz
echo $PATH
But when I'm sourcing my .profile from Publisher plugin, it just does not update the PATH variable.
So, I'm running this:
echo PATH "$PATH";
eval echo 'PATH $'PATH;
source ~/.profile.45S
eval echo 'PATH $'PATH;
And have the followign result:
- $PATH from my Jenkins slave //what I'm expecting here
- $PATH from my remote machine //also what I'm expecting here
- $PATH from my remote machine, with xxx:yyy:zzz concatenated //again, what I'm expecting here
- The same $PATH as in step 2, while I'm expecting the same as previous step.
Do you have any idea of why step 4 produces same result as step 2, while I'm expecting same result as step 3 since I experted the variable and did not change it between the 2 echo commands...