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

EnvInject overriding WORKSPACE variable

    Details

    • Type: Bug
    • Status: Reopened
    • Priority: Blocker
    • Resolution: Unresolved
    • Component/s: envinject-plugin
    • Labels:
      None

      Description

      I upgraded Jenkins to 1.458 and envinject from 1.36 to 1.44. After the upgrade all my jobs that did not use envinject were getting their WORKSPACE variable set to another jobs that did use envinject WORKSPACE. Downgraded envinject to 1.36 and the problem went away.

      Here's an edited log that shows initially the workspace is correct, even after EnvInject line, but when the shell script runs, it is wrong.

      Also, I don't know why EnvInject is even being run for this job since it is not enabled anywhere...

      [EnvInject] - Preparing an environment for the build.
      Building on master in workspace -correct-workspace-
      Updating http://svn....
      At revision 36652
      no change for http://svn.... since the previous build
      No emails were triggered.
      [bronze-bin] $ /bin/sh -xe /tmp/hudson6983282044770433158.sh
      + echo -some-other-jobs-workspace-

        Activity

        Hide
        adityachs aditya ch added a comment -

        The problem is still appearing with "Environment Injector Plugin" 1.89 and Jenkins ver. "1.509.4". Many of the jenkins variables are getting overridden with this plugin. Due to this all the working jobs getting failed.
        the configured workspace in job is /disc/c/new-artifacts/$

        {JOB_NAME}

        the at the start of the job workspace was ok as defined except JOB_NAME variable
        the expected job name is "test1" where it shows some number generated:
        (just printed all the env varibales defined in jenkins)
        [EnvInject] - Loading node environment variables.
        [EnvInject] - Preparing an environment for the build.
        [EnvInject] - Keeping Jenkins system variables.
        [EnvInject] - Keeping Jenkins build variables.
        [EnvInject] - Injecting contributions.
        Building remotely on Compute Farm 1 in workspace /disc/c/new-artifacts/jk4-40146
        [jk4-40146] $ /bin/sh -xe /tmp/843283.1.jenkins.q/hudson7322359360021153706.sh
        + echo build_tagjenkins-test1-5
        build_tagjenkins-test1-5
        + echo 5
        5
        + echo 2014-05-07_13-25-10
        2014-05-07_13-25-10
        + echo jk4-40146
        jk4-40146
        + echo jenkins-test1-5
        jenkins-test1-5
        + echo 0
        0
        + echo Compute Farm 1
        Compute Farm 1
        + echo Compute Farm 1
        Compute Farm 1
        + echo /disc/d/tools/ci-jenkins/classic-ws/workspace-cf1
        /disc/d/tools/tools/ci-jenkins/classic-ws/workspace-cf1
        + echo /disc/d/tools/ci-jenkins/classic-ws
        /disc/d/tools/ci-jenkins/classic-ws
        + echo https://jenkins.mydomain.com/classic/
        https://jenkins.mydomain.com/classic/
        + echo https://jenkins.mydomain.com/classic/job/test1/5/
        https://jenkins.mydomain.com/classic/job/test1/5/
        + echo https://jenkins.mydomain.com/classic/job/test1/
        https://jenkins.mydomain.com/classic/job/test1/
        Finished: SUCCESS

        Show
        adityachs aditya ch added a comment - The problem is still appearing with "Environment Injector Plugin" 1.89 and Jenkins ver. "1.509.4". Many of the jenkins variables are getting overridden with this plugin. Due to this all the working jobs getting failed. the configured workspace in job is /disc/c/new-artifacts/$ {JOB_NAME} the at the start of the job workspace was ok as defined except JOB_NAME variable the expected job name is "test1" where it shows some number generated: (just printed all the env varibales defined in jenkins) [EnvInject] - Loading node environment variables. [EnvInject] - Preparing an environment for the build. [EnvInject] - Keeping Jenkins system variables. [EnvInject] - Keeping Jenkins build variables. [EnvInject] - Injecting contributions. Building remotely on Compute Farm 1 in workspace /disc/c/new-artifacts/jk4-40146 [jk4-40146] $ /bin/sh -xe /tmp/843283.1.jenkins.q/hudson7322359360021153706.sh + echo build_tagjenkins-test1-5 build_tagjenkins-test1-5 + echo 5 5 + echo 2014-05-07_13-25-10 2014-05-07_13-25-10 + echo jk4-40146 jk4-40146 + echo jenkins-test1-5 jenkins-test1-5 + echo 0 0 + echo Compute Farm 1 Compute Farm 1 + echo Compute Farm 1 Compute Farm 1 + echo /disc/d/tools/ci-jenkins/classic-ws/workspace-cf1 /disc/d/tools/tools/ci-jenkins/classic-ws/workspace-cf1 + echo /disc/d/tools/ci-jenkins/classic-ws /disc/d/tools/ci-jenkins/classic-ws + echo https://jenkins.mydomain.com/classic/ https://jenkins.mydomain.com/classic/ + echo https://jenkins.mydomain.com/classic/job/test1/5/ https://jenkins.mydomain.com/classic/job/test1/5/ + echo https://jenkins.mydomain.com/classic/job/test1/ https://jenkins.mydomain.com/classic/job/test1/ Finished: SUCCESS
        Hide
        lacostej lacostej added a comment -

        I am hitting the same issue. EnvInject 1.89 and jenkins 1.532.3 and WORKSPACE got set into hudson.EnvVars.masterEnvVars which caused lots of strange build issues. This is really a bummer.

        Show
        lacostej lacostej added a comment - I am hitting the same issue. EnvInject 1.89 and jenkins 1.532.3 and WORKSPACE got set into hudson.EnvVars.masterEnvVars which caused lots of strange build issues. This is really a bummer.
        Hide
        ceilfors Wisen Tanasa added a comment -

        I'm hitting the same issue with EnvInject 1.89 and Jenkins 1.553.

        Show
        ceilfors Wisen Tanasa added a comment - I'm hitting the same issue with EnvInject 1.89 and Jenkins 1.553.
        Hide
        david_rubio David Rubio added a comment - - edited

        Similar problem detected with EnvInject 1.91.1 and Jenkins 1.609. Version 1.90 does not have the problem

        For some reason the Path env variable is not updated but java.library.path is. When you try to build, it looks in the old path

        Show
        david_rubio David Rubio added a comment - - edited Similar problem detected with EnvInject 1.91.1 and Jenkins 1.609. Version 1.90 does not have the problem For some reason the Path env variable is not updated but java.library.path is. When you try to build, it looks in the old path
        Hide
        deepchip Martin d'Anjou added a comment -

        Do you still see the problem with the 1.92.1 released on Aug 21 2015?

        Show
        deepchip Martin d'Anjou added a comment - Do you still see the problem with the 1.92.1 released on Aug 21 2015?

          People

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

            Dates

            • Created:
              Updated: