Aha!! I had wondered about something along those lines but I was looking at 
quotes for the answer and not finding it. 

I will try modifiying my submission code accordingly.

Thanks



On Friday, July 1, 2016 at 1:01:33 PM UTC+1, Daniel Beck wrote:
>
>
> > On 01.07.2016, at 13:35, Jonathan Hodgson <[email protected] 
> <javascript:>> wrote: 
> > 
> > I can't think of any reason why this should be happening other than a 
> bug, has anybody else got any input? 
>
> This is a quirk in the variable resolution in Jenkins: Any variable 
> references in parameter values are expanded. 
>
> So the line that says… 
>
> > +        sh "echo ${rep_diff}" 
>
> will be expanded by Jenkins to read 
>
> > +        sh "echo ALL OF THE SCRIPT ALL OVER AGAIN BECAUSE YAY 
> RECURSION" 
>
> … spanning from line 25 to line 89 in your second snippet. This is done by 
> Jenkins before the (processed) value is passed on to your shell script. 
>
> You should be able to prevent this by replacing all occurrences of 
> $whatever by $$whatever (escape by adding a second $) in the value you 
> submit to Jenkins. 
>
>

-- 
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/f9d80808-de53-4084-ac31-2890db734462%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to