-
Improvement
-
Resolution: Unresolved
-
Major
-
linux, jdk 1.7.0_51 jenkins 1.554.1, envinject 1.89
We have a job that uses an 'inject environment variables' build step to inject environment variables from a property file 'target/build.properties'. This property file was verified to exist in the workspace. At first this worked fine.
Then by accident someone created a file /target/build.properties in the root of the file system. What happened next is that the 'inject environment variables' build step would use this new file instead of the file in the job's workspace.
The cause of this behaviour is that the plugin first tries to resolve the path as a relative path against the current working directory (of the jenkins instance). In our case the current working directory was the root directory, which explains why it used /target/build.properties. Only when this file doesn't exist it will lookup the property file relative to the workspace. My expectation was that relative paths would only be looked up in the workspace.
- is duplicated by
-
JENKINS-29811 File used for injection is first looked up in directory containing workspace
-
- Resolved
-
-
JENKINS-36925 EnvInject - Conflicts between file names in home dir and the relative path
-
- Resolved
-
- links to
[JENKINS-23666] Change resolution order for the property files
Environment |
New:
{noformat} Naam ↓ Waarde awt.toolkit sun.awt.X11.XToolkit catalina.base /opt/tomcat6 catalina.home /opt/tomcat6 catalina.useNaming true com.sun.management.jmxremote com.sun.management.jmxremote.authenticate false com.sun.management.jmxremote.port 9003 com.sun.management.jmxremote.ssl false common.loader ${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar file.encoding UTF-8 file.encoding.pkg sun.io file.separator / guice.disable.misplaced.annotation.check true http.nonProxyHosts *.rsg http.proxyHost ibraccsqd01.nl.rsg http.proxyPort 8080 hudson.slaves.WorkspaceList _ java.awt.graphicsenv sun.awt.X11GraphicsEnvironment java.awt.headless true java.awt.printerjob sun.print.PSPrinterJob java.class.path /opt/tomcat6/bin/bootstrap.jar java.class.version 51.0 java.endorsed.dirs /opt/tomcat6/endorsed java.ext.dirs /usr/java/jdk1.7.0_51/jre/lib/ext:/usr/java/packages/lib/ext java.home /usr/java/jdk1.7.0_51/jre java.io.tmpdir /opt/tomcat6/temp java.library.path /usr/lib/oracle/11.2/client/lib:/usr/java/packages/lib/i386:/lib:/usr/lib java.naming.factory.initial org.apache.naming.java.javaURLContextFactory java.naming.factory.url.pkgs org.apache.naming java.rmi.server.hostname java.rmi.server.randomIDs true java.runtime.name Java(TM) SE Runtime Environment java.runtime.version 1.7.0_51-b13 java.security.egd file:///dev/urandom java.specification.name Java Platform API Specification java.specification.vendor Oracle Corporation java.specification.version 1.7 java.util.logging.config.file /opt/tomcat6/conf/logging.properties java.util.logging.manager org.apache.juli.ClassLoaderLogManager java.vendor Oracle Corporation java.vendor.url http://java.oracle.com/ java.vendor.url.bug http://bugreport.sun.com/bugreport/ java.version 1.7.0_51 java.vm.info mixed mode java.vm.name Java HotSpot(TM) Server VM java.vm.specification.name Java Virtual Machine Specification java.vm.specification.vendor Oracle Corporation java.vm.specification.version 1.7 java.vm.vendor Oracle Corporation java.vm.version 24.51-b03 jna.platform.library.path /usr/lib:/lib line.separator mail.smtp.sendpartial true mail.smtps.sendpartial true os.arch i386 os.name Linux os.version 2.6.18-308.el5PAE package.access sun.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.,sun.beans. package.definition sun.,java.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper. path.separator : securerandom.source file:/dev/./urandom server.loader shared.loader sun.arch.data.model 32 sun.boot.class.path /usr/java/jdk1.7.0_51/jre/lib/resources.jar:/usr/java/jdk1.7.0_51/jre/lib/rt.jar:/usr/java/jdk1.7.0_51/jre/lib/sunrsasign.jar:/usr/java/jdk1.7.0_51/jre/lib/jsse.jar:/usr/java/jdk1.7.0_51/jre/lib/jce.jar:/usr/java/jdk1.7.0_51/jre/lib/charsets.jar:/usr/java/jdk1.7.0_51/jre/lib/jfr.jar:/usr/java/jdk1.7.0_51/jre/classes sun.boot.library.path /usr/java/jdk1.7.0_51/jre/lib/i386 sun.cpu.endian little sun.cpu.isalist sun.font.fontmanager sun.awt.X11FontManager sun.io.unicode.encoding UnicodeLittle sun.java.command org.apache.catalina.startup.Bootstrap start sun.java.launcher SUN_STANDARD sun.jnu.encoding UTF-8 sun.management.compiler HotSpot Tiered Compilers sun.os.patch.level unknown svnkit.http.methods Digest,Basic,NTLM,Negotiate svnkit.ssh2.persistent false tomcat.util.buf.StringCache.byte.enabled true user.country US user.dir / user.home /root user.language en user.name root user.timezone Europe/Amsterdam Omgevingsvariabelen Naam ↓ Waarde _ /opt/jdk/bin/java JENKINS_HOME /data/jenkins-work LANG en_US.UTF-8 LD_LIBRARY_PATH /usr/lib/oracle/11.2/client/lib NLSPATH /usr/dt/lib/nls/msg/%L/%N.cat PATH /sbin:/usr/sbin:/bin:/usr/bin PWD / SHLVL 2 TERM xterm TNS_ADMIN /usr/lib/oracle/11.2/client/network/admin XFILESEARCHPATH /usr/dt/app-defaults/%L/Dt Invoegtoepassingen Naam ↓ Versie Ingeschakeld Pinned active-directory 1.37 true false analysis-core 1.56 true false ant 1.2 true true antisamy-markup-formatter 1.1 true true artifact-promotion 0.2.6 true false async-http-client 1.7.8 true false awseb-deployment-plugin 0.0.3 true false build-flow-plugin 0.12 true false build-name-setter 1.3 true false build-pipeline-plugin 1.4.2 true true build-timeout 1.13 true false buildgraph-view 1.1.1 true false checkstyle 3.39 true false cloudbees-folder 4.5 true false cloverphp 0.3.3 true false conditional-buildstep 1.3.3 true false config-file-provider 2.7.4 true false configurationslicing 1.38.3 true false copy-project-link 1.2 true false copyartifact 1.30 true false crap4j 0.8 true false credentials 1.11 true true cucumber-reports 0.0.23 true false custom-tools-plugin 0.4.1 true false cvs 2.11 true true dashboard-view 2.9.2 true false delivery-pipeline-plugin 0.8.0 true false deployed-on-column 1.7 true false deployment-notification 1.1 true false downstream-buildview 1.9 true false dry 2.40 true false dynamicparameter 0.2.1-SNAPSHOT (private-12/02/2013 12:37-John) true false elastic-axis 1.2 true false email-ext 2.37.2.2 true false envfile 1.2 true false envinject 1.89 true false extended-choice-parameter 0.28 true false extensible-choice-parameter 1.2.2 true false external-monitor-job 1.2 true true folder-environment-variables 0.3 true false gatling 1.0.3 true false git 2.2.1 true false git-client 1.9.1 true false git-server 1.3 true false gradle 1.23 true false groovy 1.18 true false groovy-postbuild 1.9 true false htmlpublisher 1.3 true false http_request 1.8.3 true false javadoc 1.1 true true jdepend 1.2.3 true false jenkins-multijob-plugin 1.13 true false job-dsl 1.23-SNAPSHOT (private-05/09/2014 15:47-John) true false job-import-plugin 1.2 true false jquery 1.7.2-1 true false jquery-ui 1.0.2 true false ldap 1.6 true true m2release 0.14.0 true false mailer 1.8 true true mapdb-api 1.0.1.0 true false mask-passwords 2.7.2 true false matrix-auth 1.2 true true maven-deployment-linker 1.5.1 true false maven-metadata-plugin 1.1.1 true false maven-plugin 2.3 true true notification 1.5 true false pam-auth 1.1 true true Parameterized-Remote-Trigger 2.1 true false parameterized-trigger 2.24 true false plot 1.7 true false pmd 3.38 true false port-allocator 1.8 true false promoted-builds 2.16 true false publish-over-ssh 1.11 true false rebuild 1.21 true false release 2.4.1 true false repository 1.2 true false repository-connector 0.8.2 true false run-condition 1.0 true false scm-api 0.2 true false scriptler 2.7 true false sonar 2.1 true false ssh 2.4 true false ssh-agent 1.4.1 true false ssh-credentials 1.6.1 true true ssh-slaves 1.6 true true subversion 2.5-SNAPSHOT (private-05/26/2014 18:23-John) true true svn-tag 1.16 true false swarm 1.15 true false text-finder 1.10 true false throttle-concurrents 1.8.2 true false token-macro 1.10 true false toolenv 1.1 true false translation 1.11 true true urltrigger 0.37 true false view-job-filters 1.26 true false violations 0.7.11 true false windows-slaves 1.0 true false ws-cleanup 0.20 true false xunit 1.89 true false xvfb 1.0.10 true false xvnc 1.17 true false{noformat} |
Description |
New:
We have a job that uses an 'inject environment variables' build step to inject environment variables from a property file 'target/build.properties'. This property file was verified to exist in the workspace. By accident someone created a file /target/build.properties in the root of the file system. When this file exists it will be used by the 'inject environment variables' build step instead of the file in the workspace. |
|
Environment |
Original:
{noformat} Naam ↓ Waarde awt.toolkit sun.awt.X11.XToolkit catalina.base /opt/tomcat6 catalina.home /opt/tomcat6 catalina.useNaming true com.sun.management.jmxremote com.sun.management.jmxremote.authenticate false com.sun.management.jmxremote.port 9003 com.sun.management.jmxremote.ssl false common.loader ${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar file.encoding UTF-8 file.encoding.pkg sun.io file.separator / guice.disable.misplaced.annotation.check true http.nonProxyHosts *.rsg http.proxyHost ibraccsqd01.nl.rsg http.proxyPort 8080 hudson.slaves.WorkspaceList _ java.awt.graphicsenv sun.awt.X11GraphicsEnvironment java.awt.headless true java.awt.printerjob sun.print.PSPrinterJob java.class.path /opt/tomcat6/bin/bootstrap.jar java.class.version 51.0 java.endorsed.dirs /opt/tomcat6/endorsed java.ext.dirs /usr/java/jdk1.7.0_51/jre/lib/ext:/usr/java/packages/lib/ext java.home /usr/java/jdk1.7.0_51/jre java.io.tmpdir /opt/tomcat6/temp java.library.path /usr/lib/oracle/11.2/client/lib:/usr/java/packages/lib/i386:/lib:/usr/lib java.naming.factory.initial org.apache.naming.java.javaURLContextFactory java.naming.factory.url.pkgs org.apache.naming java.rmi.server.hostname java.rmi.server.randomIDs true java.runtime.name Java(TM) SE Runtime Environment java.runtime.version 1.7.0_51-b13 java.security.egd file:///dev/urandom java.specification.name Java Platform API Specification java.specification.vendor Oracle Corporation java.specification.version 1.7 java.util.logging.config.file /opt/tomcat6/conf/logging.properties java.util.logging.manager org.apache.juli.ClassLoaderLogManager java.vendor Oracle Corporation java.vendor.url http://java.oracle.com/ java.vendor.url.bug http://bugreport.sun.com/bugreport/ java.version 1.7.0_51 java.vm.info mixed mode java.vm.name Java HotSpot(TM) Server VM java.vm.specification.name Java Virtual Machine Specification java.vm.specification.vendor Oracle Corporation java.vm.specification.version 1.7 java.vm.vendor Oracle Corporation java.vm.version 24.51-b03 jna.platform.library.path /usr/lib:/lib line.separator mail.smtp.sendpartial true mail.smtps.sendpartial true os.arch i386 os.name Linux os.version 2.6.18-308.el5PAE package.access sun.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.,sun.beans. package.definition sun.,java.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper. path.separator : securerandom.source file:/dev/./urandom server.loader shared.loader sun.arch.data.model 32 sun.boot.class.path /usr/java/jdk1.7.0_51/jre/lib/resources.jar:/usr/java/jdk1.7.0_51/jre/lib/rt.jar:/usr/java/jdk1.7.0_51/jre/lib/sunrsasign.jar:/usr/java/jdk1.7.0_51/jre/lib/jsse.jar:/usr/java/jdk1.7.0_51/jre/lib/jce.jar:/usr/java/jdk1.7.0_51/jre/lib/charsets.jar:/usr/java/jdk1.7.0_51/jre/lib/jfr.jar:/usr/java/jdk1.7.0_51/jre/classes sun.boot.library.path /usr/java/jdk1.7.0_51/jre/lib/i386 sun.cpu.endian little sun.cpu.isalist sun.font.fontmanager sun.awt.X11FontManager sun.io.unicode.encoding UnicodeLittle sun.java.command org.apache.catalina.startup.Bootstrap start sun.java.launcher SUN_STANDARD sun.jnu.encoding UTF-8 sun.management.compiler HotSpot Tiered Compilers sun.os.patch.level unknown svnkit.http.methods Digest,Basic,NTLM,Negotiate svnkit.ssh2.persistent false tomcat.util.buf.StringCache.byte.enabled true user.country US user.dir / user.home /root user.language en user.name root user.timezone Europe/Amsterdam Omgevingsvariabelen Naam ↓ Waarde _ /opt/jdk/bin/java JENKINS_HOME /data/jenkins-work LANG en_US.UTF-8 LD_LIBRARY_PATH /usr/lib/oracle/11.2/client/lib NLSPATH /usr/dt/lib/nls/msg/%L/%N.cat PATH /sbin:/usr/sbin:/bin:/usr/bin PWD / SHLVL 2 TERM xterm TNS_ADMIN /usr/lib/oracle/11.2/client/network/admin XFILESEARCHPATH /usr/dt/app-defaults/%L/Dt Invoegtoepassingen Naam ↓ Versie Ingeschakeld Pinned active-directory 1.37 true false analysis-core 1.56 true false ant 1.2 true true antisamy-markup-formatter 1.1 true true artifact-promotion 0.2.6 true false async-http-client 1.7.8 true false awseb-deployment-plugin 0.0.3 true false build-flow-plugin 0.12 true false build-name-setter 1.3 true false build-pipeline-plugin 1.4.2 true true build-timeout 1.13 true false buildgraph-view 1.1.1 true false checkstyle 3.39 true false cloudbees-folder 4.5 true false cloverphp 0.3.3 true false conditional-buildstep 1.3.3 true false config-file-provider 2.7.4 true false configurationslicing 1.38.3 true false copy-project-link 1.2 true false copyartifact 1.30 true false crap4j 0.8 true false credentials 1.11 true true cucumber-reports 0.0.23 true false custom-tools-plugin 0.4.1 true false cvs 2.11 true true dashboard-view 2.9.2 true false delivery-pipeline-plugin 0.8.0 true false deployed-on-column 1.7 true false deployment-notification 1.1 true false downstream-buildview 1.9 true false dry 2.40 true false dynamicparameter 0.2.1-SNAPSHOT (private-12/02/2013 12:37-John) true false elastic-axis 1.2 true false email-ext 2.37.2.2 true false envfile 1.2 true false envinject 1.89 true false extended-choice-parameter 0.28 true false extensible-choice-parameter 1.2.2 true false external-monitor-job 1.2 true true folder-environment-variables 0.3 true false gatling 1.0.3 true false git 2.2.1 true false git-client 1.9.1 true false git-server 1.3 true false gradle 1.23 true false groovy 1.18 true false groovy-postbuild 1.9 true false htmlpublisher 1.3 true false http_request 1.8.3 true false javadoc 1.1 true true jdepend 1.2.3 true false jenkins-multijob-plugin 1.13 true false job-dsl 1.23-SNAPSHOT (private-05/09/2014 15:47-John) true false job-import-plugin 1.2 true false jquery 1.7.2-1 true false jquery-ui 1.0.2 true false ldap 1.6 true true m2release 0.14.0 true false mailer 1.8 true true mapdb-api 1.0.1.0 true false mask-passwords 2.7.2 true false matrix-auth 1.2 true true maven-deployment-linker 1.5.1 true false maven-metadata-plugin 1.1.1 true false maven-plugin 2.3 true true notification 1.5 true false pam-auth 1.1 true true Parameterized-Remote-Trigger 2.1 true false parameterized-trigger 2.24 true false plot 1.7 true false pmd 3.38 true false port-allocator 1.8 true false promoted-builds 2.16 true false publish-over-ssh 1.11 true false rebuild 1.21 true false release 2.4.1 true false repository 1.2 true false repository-connector 0.8.2 true false run-condition 1.0 true false scm-api 0.2 true false scriptler 2.7 true false sonar 2.1 true false ssh 2.4 true false ssh-agent 1.4.1 true false ssh-credentials 1.6.1 true true ssh-slaves 1.6 true true subversion 2.5-SNAPSHOT (private-05/26/2014 18:23-John) true true svn-tag 1.16 true false swarm 1.15 true false text-finder 1.10 true false throttle-concurrents 1.8.2 true false token-macro 1.10 true false toolenv 1.1 true false translation 1.11 true true urltrigger 0.37 true false view-job-filters 1.26 true false violations 0.7.11 true false windows-slaves 1.0 true false ws-cleanup 0.20 true false xunit 1.89 true false xvfb 1.0.10 true false xvnc 1.17 true false{noformat} |
New: linux, jdk 1.7.0_51 jenkins 1.554.1, envinject 1.89 |
Description |
Original:
We have a job that uses an 'inject environment variables' build step to inject environment variables from a property file 'target/build.properties'. This property file was verified to exist in the workspace. By accident someone created a file /target/build.properties in the root of the file system. When this file exists it will be used by the 'inject environment variables' build step instead of the file in the workspace. |
New:
We have a job that uses an 'inject environment variables' build step to inject environment variables from a property file 'target/build.properties'. This property file was verified to exist in the workspace. At first this worked fine. Then by accident someone created a file /target/build.properties in the root of the file system. What happened next is that the 'inject environment variables' build step would use this new file instead of the file in the job's workspace. |
Description |
Original:
We have a job that uses an 'inject environment variables' build step to inject environment variables from a property file 'target/build.properties'. This property file was verified to exist in the workspace. At first this worked fine. Then by accident someone created a file /target/build.properties in the root of the file system. What happened next is that the 'inject environment variables' build step would use this new file instead of the file in the job's workspace. |
New:
We have a job that uses an 'inject environment variables' build step to inject environment variables from a property file 'target/build.properties'. This property file was verified to exist in the workspace. At first this worked fine. Then by accident someone created a file /target/build.properties in the root of the file system. What happened next is that the 'inject environment variables' build step would use this new file instead of the file in the job's workspace. The cause of this behaviour is that the plugin first tries to resolve the path as a relative path against the current working directory (of the jenkins instance). In our case the current working directory was the root directory, which explains why it used /target/build.properties. Only when this file doesn't exist it will lookup the property file relative to the workspace. |
Description |
Original:
We have a job that uses an 'inject environment variables' build step to inject environment variables from a property file 'target/build.properties'. This property file was verified to exist in the workspace. At first this worked fine. Then by accident someone created a file /target/build.properties in the root of the file system. What happened next is that the 'inject environment variables' build step would use this new file instead of the file in the job's workspace. The cause of this behaviour is that the plugin first tries to resolve the path as a relative path against the current working directory (of the jenkins instance). In our case the current working directory was the root directory, which explains why it used /target/build.properties. Only when this file doesn't exist it will lookup the property file relative to the workspace. |
New:
We have a job that uses an 'inject environment variables' build step to inject environment variables from a property file 'target/build.properties'. This property file was verified to exist in the workspace. At first this worked fine. Then by accident someone created a file /target/build.properties in the root of the file system. What happened next is that the 'inject environment variables' build step would use this new file instead of the file in the job's workspace. The cause of this behaviour is that the plugin first tries to resolve the path as a relative path against the current working directory (of the jenkins instance). In our case the current working directory was the root directory, which explains why it used /target/build.properties. Only when this file doesn't exist it will lookup the property file relative to the workspace. My expectation was that relative paths would only be looked up in the workspace. |
Workflow | Original: JNJira [ 156450 ] | New: JNJira + In-Review [ 179283 ] |
Assignee | Original: Gregory Boissinot [ gbois ] | New: Oleg Nenashev [ oleg_nenashev ] |
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |
Remote Link | New: This issue links to "PR #77 (Web Link)" [ 14858 ] |