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

Existing variables not being substituted in Properties Content

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • envinject-plugin
    • Jenkins: 2.83
      EnvInject API Plugin: 2.3
      Environment Injector Plugin: 2.1.4
    • 2.1.6

      It looks like variables are not being resolved/substituted as they were previously in the "Properties Content" section of the EnvInjectJobProperty section of a job. In version 2.1.3 of the plugin, the steps below worked. In 2.1.4 it no longer works.

      Steps to Reproduce:

      1. Create a new job, simple/free-style is fine.
      2. Enable the Prepare an environment for the run job property.
      3. In the Properties Content section, enter the content:
        TEST_FILE=${WORKSPACE}/test.txt
      1. Save and run the job.
      2. View the environment variables of the build.

      Expected Result:

      I would expect the environment variable TEST_FILE to be equal to the value of the WORKSPACE environment variable with "/test.txt" append on to the end of it. For example, if WORKSPACE is equal to "/workspace" then the value of TEST_FILE should be "/workspace/test.txt". This was the behavior prior to the 2.1.4 release.

      Actual Result:

      The actual result is that TEST_FILE is literally equal to the value entered. For example, "${WORKSPACE}/test.txt". This behavior started in 2.1.4.

            Unassigned Unassigned
            krische Brian Krische
            Votes:
            12 Vote for this issue
            Watchers:
            21 Start watching this issue

              Created:
              Updated:
              Resolved: