Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-16219

Version 1.77 injects all *environment* variables into ANT command line (-D)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • envinject-plugin
    • None

      Since I installed the update of the EnvInject plugin (1.76 -> 1.77), all build steps that use ANT (MVN not tested) now add all injected environment variables as -D parameters into the ANT command line.

      E.g. (in 1.76, correct):

      [Lucene-Solr-trunk-Linux] $ /var/lib/jenkins/tools/hudson.tasks.Ant_AntInstallation/ANT_1.8.2/bin/ant "-Dargs=-client -XX:+UseG1GC" -Dtests.multiplier=3 -Dtests.jvms=2 jenkins-hourly
      

      Now in 1.77 it looks like that:

      [Lucene-Solr-trunk-Linux] $ /var/lib/jenkins/tools/hudson.tasks.Ant_AntInstallation/ANT_1.8.2/bin/ant -DTERM=linux -DJENKINS_HOME=/var/lib/jenkins -DSHLVL=1 -DJAVA_HOME=/var/lib/jenkins/tools/java/32bit/jdk1.6.0_37 -DNODE_LABELS=master -DXFILESEARCHPATH=/usr/dt/app-defaults/%L/Dt "-DTEST_JVM_ARGS=-client -XX:+UseSerialGC" -DJAVA=32bit/jdk1.6.0_37 -DHUDSON_URL=http://jenkins.sd-datasolutions.de/ -DMAIL=/var/mail/jenkins -DXDG_SESSION_COOKIE=1293b92236e8d1cf996f5d354d67bc6d-1356708916.634490-420301248 -DJOB_URL=http://jenkins.sd-datasolutions.de/job/Lucene-Solr-trunk-Linux/ -DPWD=/var/lib/jenkins -DBUILD_ID=2012-12-28_15-35-59 -DBUILD_CAUSE=USERIDCAUSE -DPATH+JDK=/var/lib/jenkins/tools/java/32bit/jdk1.6.0_37/bin -DLOGNAME=jenkins -DBUILD_TAG=jenkins-Lucene-Solr-trunk-Linux-3469 -DBUILD_URL=http://jenkins.sd-datasolutions.de/job/Lucene-Solr-trunk-Linux/3469/ -D_=/usr/bin/daemon -DNODE_NAME=master -DBUILD_CAUSE_USERIDCAUSE=true -DNLSPATH=/usr/dt/lib/nls/msg/%L/%N.cat -DBUILD_NUMBER=3469 -DLD_LIBRARY_PATH=/usr/lib/jvm/j2sdk1.6-sun/jre/lib/amd64/server:/usr/lib/jvm/j2sdk1.6-sun/jre/lib/amd64:/usr/lib/jvm/j2sdk1.6-sun/jre/../lib/amd64 -DEXECUTOR_NUMBER=0 "-DJAVA_DESC=32bit/jdk1.6.0_37 -client -XX:+UseSerialGC" -DSHELL=/bin/bash -DJENKINS_SERVER_COOKIE=3208f2ffb2a3f912a43f43559f64a355 -DLANGUAGE=en_US -DWORKSPACE=/var/lib/jenkins/workspace/Lucene-Solr-trunk-Linux -DPATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games -DJENKINS_URL=http://jenkins.sd-datasolutions.de/ -DUSER=jenkins -DHOME=/var/lib/jenkins -DJOB_NAME=Lucene-Solr-trunk-Linux -DHUDSON_SERVER_COOKIE=3208f2ffb2a3f912a43f43559f64a355 -DHUDSON_HOME=/var/lib/jenkins "-DHISTTIMEFORMAT=[%Y-%m-%d %T] " -DLANG=en_US.UTF-8 "-Dargs=-client -XX:+UseSerialGC" -Dtests.multiplier=3 -Dtests.jvms=2 jenkins-hourly
      

      You see, all the stuff from the environment is passed in the command line -> and this should not happen! It looks like this is related to the fix for JENKINS-14437.

      In all cases there must be an option not to do this. The only params that should be submitted to ANT should be the ones configured inside the ANT build step not those completely unrelated.

            gbois Gregory Boissinot
            thetaphi Uwe Schindler
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: