[JIRA] [ant] (JENKINS-21053) Incorrect passing of arguments

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[JIRA] [ant] (JENKINS-21053) Incorrect passing of arguments

JIRA noreply@jenkins-ci.org
Issue Type: Bug Bug
Affects Versions: current
Assignee: Unassigned
Components: ant
Created: 18/Dec/13 12:13 AM

One of our builds uses this command within Jenkins:

SVN_SRC="svn://svn.usdataworks.com/Repository/$location"; DATE_STR=`date +%Y%m%d-%H%M%S`; SVN_DST="$DATE_STR-$label"; mkdir /usdataworks/dev/$DATE_STR; PATH=.:$PATH udwBuild.sh -c $SVN_SRC -p -r -v $label -t $SVN_DST -j $JAVA_HOME -D "-DkeyStore=../../../../../../../../var/lib/jenkins/.jks/myclearingworks.jks -DkeyAlias=\"key from secure.instantssl.com\" -Dstorepass=<redacted> -Dkeypass=<redacted>" /usdataworks/dev/$DATE_STR; rm -rf /usdataworks/dev/$DATE_STR

However, an strace shows that by the time ant is called, "-DkeyStore..." has been stripped of the -D, so that ant interprets the remaining "keyStore..." as an ant target and the build fails because that target isn't defined.

The ant command ends up being:

5590 execve("/opt/apache-ant-1.8.3/bin/ant", ["ant", "-Dversion.label.core=3.7.1_rc12", "keyStore=../../../../var/lib/jenkins/.jks/myclearingworks.jks", "-DkeyAlias=\\\"key", "from", "secure.instantssl.com\\\"", "-Dstorepass=<redacted>", "-Dkeypass=<redacted>", "clean", "build"], [/* 39 vars */]) = 0

We also noticed that, in Jenkins' console output, the command line was shown as:

udwBuildApp.sh -p svn://svn.usdataworks.com/Repository/tags/3.6.2.FP1 -a svn://svn.usdataworks.com/Applications/ConfigurationReplicator/trunk -v 0.0.9 -j svn://svn.usdataworks.com/Applications/ConfigurationReplicator/branches/ReleaseCandidates -D '-DkeyStore=../../../../../../../../var/lib/jenkins/.jks/myclearingworks.jks -DkeyAlias="key from secure.instantssl.com" -Dstorepass=<redacted> -Dkeypass=<redacted>'

In addition to losing the -D in front of keyStore, it looks like Jenkins converted the double quotes we actually typed into single quotes?

Environment: CentOS 6.5 x86_64
Oracle Java jdk 1.6.0_31
Ant 1.8.3
Jenkins installed from RPM
Project: Jenkins
Priority: Blocker Blocker
Reporter: Edgar Anderson
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.