It IS adding the single quotes to build parameters! On Friday, December 18, 2015 at 7:58:04 PM UTC-5, Daniel Beck wrote: > > I answered this on IRC. Here's basically the same answer again: > http://stackoverflow.com/a/34364786 > > On 18.12.2015, at 22:57, [email protected] <javascript:> wrote: > > > I've also tried doing this: > > Name: OPTS > > Default Value: -o tmp -e "arg1=${VAR1} arg2=${VAR2} arg3=${VAR3}" > > > > Execute shell command: > > ARGS=$(echo $OPTS) > > ./build_app $ARGS > > > > Console Output: > > > > ++ echo -o tmp -e '"arg1=value1' arg2=value2 'arg3=value3"' > > + ARGS='-o tmp -e "arg1=${VAR1} arg2=${VAR2} arg3={VAR3}"' > > > > + ./build_app -o tmp -e '"arg1=value1' arg2=value2 'arg3=value3"' > > > > So it seems the parameter variable itself doesn't contain the single > quotes, just when it's being referenced. And the single quotes only appear > around wherever there's double quotes in the string. > > > > On Friday, December 18, 2015 at 4:21:20 PM UTC-5, [email protected] wrote: > > I basically have a string parameter that contains values from other > parameter fields, which I then use again in the Execute shell command. > > However, Jenkins adds single quotes in erroneous places within that > string, which makes the executing application unable to parse the > arguments. > > > > Example: > > > > Name: OPTS > > Default Value: -e "arg1=${VAR1} arg2=${VAR2} arg3={VAR3}" > > > > Execute shell > > Command: ./build_app $OPTS > > > > > > Console Output: > > ./build_app -e '"arg1=value1' arg2=value2 'arg3=value3"' > > > > > > Notice the placement of the single quotes preceding the opening double > quote and after value1, and before arg3 and after the closing double quote. > These were not added by me. > > > > I have also tried: > > Command: ./build_app $(echo $OPTS) > > > > but it renders the same results. > > > > I am trying to figure out if this is expected behavior or if this is an > actual bug. > > The only other mention of this issue was found here (which went > unanswered): > http://stackoverflow.com/questions/28260083/how-do-i-prevent-jenkins-from-single-quoting-the-parameterized-value > > > > > I am currently running Jenkins 1.642. > > > > > > 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 [email protected] <javascript:>. > > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-users/ae6da2f1-0391-4f15-97e8-e114734dc1a2%40googlegroups.com. > > > > For more options, visit https://groups.google.com/d/optout. > >
-- 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/3d35cd9a-0dd6-407a-8ccf-a88c6b156452%40googlegroups.com.
