Change resolution order for the property files

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      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.

            Assignee:
            Unassigned
            Reporter:
            Wilco Greven
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: