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!
++ 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"'
> To unsubscribe from this group and stop receiving emails from it, send an email to jenkins...@googlegroups.com.