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

EnvInject Undefines Jenkins Global properties referencing WORKSPACE variable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Component/s: envinject-plugin
    • Labels:
      None
    • Environment:
      Linux lc-irv-1231 2.6.9-89.0.9.ELsmp #1 SMP Wed Aug 19 08:06:10 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux

      Jenkins 1.486
      envinject 1.72
    • Similar Issues:

      Description

      In my jenkins configuration for "Global properties", I have a property TEST_WORKSPACE defined as $

      {WORKSPACE}

      .

      Then in my jenkins job I have "prepare an environment for the run" defined to a file which does not set TEST_WORKSPACE or WORKSPACE.

      But, when I run the job, TEST_WORKSPACE is not defined in console, I get this:

      [EnvInject] - Loading node environment variables.
      [EnvInject] - Preparing an environment for the build.
      [EnvInject] - Keeping Jenkins system variables.
      [EnvInject] - Keeping Jenkins build variables.
      [EnvInject] - Adding build parameters as variables.
      [EnvInject] - Injecting as environment variables the properties file path '/home/jims/global.prop'
      [EnvInject] - Variables injected successfully.
      [EnvInject] - Injecting contributions.
      Building on master in workspace /projects/BCMQUAL/jenkins_test/jobs/test-envinject/workspace
      [workspace] $ /bin/sh -x /tmp/hudson3013573853871224155.sh
      + echo 'WORKSPACE = /projects/BCMQUAL/jenkins_test/jobs/test-envinject/workspace'
      WORKSPACE = /projects/BCMQUAL/jenkins_test/jobs/test-envinject/workspace
      + echo 'TEST_WORKSPACE = '
      TEST_WORKSPACE =
      Notifying upstream projects of job completion
      Finished: SUCCESS

      If I revert back to envinject 1.36, then it is defined and I see this in the console:

      [EnvInject] - Preparing an environment for the job.
      [EnvInject] - Keep Jenkins system variables.
      [EnvInject] - Keep Jenkins build variables.
      [EnvInject] - Injecting as environment variables the properties file path '/home/jims/global.prop'
      [EnvInject] - Variables injected successfully.
      [EnvInject] - Unset unresolved 'TEST_WORKSPACE' variable.
      Building on master in workspace /projects/BCMQUAL/jenkins_test/jobs/test-envinject/workspace
      [workspace] $ /bin/sh -x /tmp/hudson3503397345619621354.sh
      + echo 'WORKSPACE = /projects/BCMQUAL/jenkins_test/jobs/test-envinject/workspace'
      WORKSPACE = /projects/BCMQUAL/jenkins_test/jobs/test-envinject/workspace
      + echo 'TEST_WORKSPACE = /projects/BCMQUAL/jenkins_test/jobs/test-envinject/workspace'
      TEST_WORKSPACE = /projects/BCMQUAL/jenkins_test/jobs/test-envinject/workspace
      Notifying upstream projects of job completion
      Finished: SUCCESS

        Attachments

          Activity

            People

            • Assignee:
              gbois Gregory Boissinot
              Reporter:
              jimsearle Jim Searle
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: