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

EnvInject plugin using a cached value for ${WORKSPACE}

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • envinject-plugin
    • None

      Starting yesterday, the EnvInject plugin seems to suddenly start using a cached value for ${WORKSPACE}. We have the following value in "Properties Content" under "Inject environment variables to the build process":

      PATH=${WORKSPACE}/.env/bin:$PATH

      When working properly, in the console output this appears as:

      [EnvInject] - Injecting as environment variables the properties content
      PATH=${WORKSPACE}/.env/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/bin

      Over the past couple of days this has suddenly started appearing as:

      [EnvInject] - Injecting as environment variables the properties content
      PATH=/Users/Shared/Jenkins/Home/jobs/bidpom.stage/workspace/.env/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/bin

      Which is using a workspace path from another job. This causes this job, and all other jobs, to fail. If I restart Jenkins the problem goes away, for awhile, but at some point that exact same path starts getting used by the EnvInject plugin again. This cycle has happened 4 times over the past couple of days, where jobs will run fine for awhile and then suddenly start failing because the path injected changes from:

      ${WORKSPACE}/.env/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/bin

      to:

      /Users/Shared/Jenkins/Home/jobs/bidpom.stage/workspace/.env/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/bin

      When this first happened we downgraded the plugin from 1.78 to 1.77 but this hasn't addressed the problem.

      Any help anyone can provide would be greatly appreciated.

          [JENKINS-16233] EnvInject plugin using a cached value for ${WORKSPACE}

            gbois Gregory Boissinot
            bobsilverberg Bob Silverberg
            Votes:
            6 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated: