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

EnvInject - Conflicts between file names in home dir and the relative path

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • envinject-plugin
    • None
    • Jenkins ver. 1.642
      Environment Injector Plugin 1.90
      Setup with a build slave

      If a file exists in slave home directory, e.g. /home/jenkinsslave/env.properties, then injecting environment variables will fail, if the Properties File has the same name.

      Top level file exists:

      ...
      + cat env.properties
      VERSION=123
      [EnvInject] - Injecting environment variables from a build step.
      [EnvInject] - Injecting as environment variables the properties file path 'env.properties'
      [EnvInject] - Variables injected successfully.
      ...
      /home/jenkinsslave/tools/hudson.tasks.Maven_MavenInstallation/Maven_3/bin/mvn versions:set -DnewVersion=$VERSION
      

      Top level file does not exist:

      ...
      + cat env.properties
      VERSION=123
      [EnvInject] - Injecting environment variables from a build step.
      [EnvInject] - Injecting as environment variables the properties file path 'env.properties'
      [EnvInject] - Variables injected successfully.
      ...
      /home/jenkinsslave/tools/hudson.tasks.Maven_MavenInstallation/Maven_3/bin/mvn versions:set -DnewVersion=123
      

          [JENKINS-36925] EnvInject - Conflicts between file names in home dir and the relative path

          Paul Eipper added a comment -

          Just tripped on this issue.

          In my case it was caused because on the Prepare Environment I had a shell script that created a properties file.

          It seems the default folder at that point is the Jenkins home folder.

          Paul Eipper added a comment - Just tripped on this issue. In my case it was caused because on the Prepare Environment I had a shell script that created a properties file. It seems the default folder at that point is the Jenkins home folder.

          Oleg Nenashev added a comment -

          Closing as a duplicate of JENKINS-23666

          Oleg Nenashev added a comment - Closing as a duplicate of JENKINS-23666

            oleg_nenashev Oleg Nenashev
            hnkchnsk Stefan Kober
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: