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

EnvInject undefines NODE_NAME environment variable on master

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • envinject-plugin
    • None
    • Windows 7, 64 bit

      I have quite a lot of jobs which can roam around between master and about 20 Slaves. The initial job updates an SCM view and compiles the software and starts depending jobs like building an installer. The installer job needs to know on which node to run which it is told by using the parameterized trigger plugin and the node label parameter plugin. After upgrading to latest Jenkins 1.527 this mechanism is broken at least for a Windows 7/64 bit master.

      I had similar problems about a year ago, see JENKINS-14109. Maybe this is helpful.

      Downgrading to 1.526 fixes the issue, so there must be a change in core which caused this. The only suspect from the changes I can see is JENKINS-19042

          [JENKINS-19222] EnvInject undefines NODE_NAME environment variable on master

          Dirk Kuypers created issue -

          I can see the same problem using Linux. Version 1.528 still have the same problem.

          Fernando sarlenga added a comment - I can see the same problem using Linux. Version 1.528 still have the same problem.

          Which version of the nodelabelparameter plugin are you using?

          Dominik Bartholdi added a comment - Which version of the nodelabelparameter plugin are you using?

          Dirk Kuypers added a comment -

          I am using the latest one, version 1.4. The same applies to parameterized trigger plugin, version 2.19.

          Dirk Kuypers added a comment - I am using the latest one, version 1.4. The same applies to parameterized trigger plugin, version 2.19.

          I'm not using the nodelabel plug in, I'm accessing ${NODE_NAME} as an environment variable.

          Fernando sarlenga added a comment - I'm not using the nodelabel plug in, I'm accessing ${NODE_NAME} as an environment variable.

          I'm not able to reproduce this, can you please clearly describe how to reproduce this scenario?
          Maybe you can use the recipe plugin to provide the configuration? https://wiki.jenkins-ci.org/display/JENKINS/Recipe+Plugin

          Dominik Bartholdi added a comment - I'm not able to reproduce this, can you please clearly describe how to reproduce this scenario? Maybe you can use the recipe plugin to provide the configuration? https://wiki.jenkins-ci.org/display/JENKINS/Recipe+Plugin

          Dirk Kuypers added a comment -

          Config JOB A

          Dirk Kuypers added a comment - Config JOB A
          Dirk Kuypers made changes -
          Attachment New: config.xml [ 24248 ]

          Dirk Kuypers added a comment - - edited

          Hi, you are right, this was a tough one to reproduce because when I set up small demo jobs with a play-around Jenkins with node label parameters only it worked.

          What is different at my "real" Jenkins:

          • the upstream job uses a Label (clearcase) to find any machine with ClearCase installed
          • the downstream job has a node label as parameter called HOST_NAME. The upstream job explicitely passes HOST_NAME as ${NODE_NAME}

          I will try to attach the config.xml of my small demo jobs.

          Dirk Kuypers added a comment - - edited Hi, you are right, this was a tough one to reproduce because when I set up small demo jobs with a play-around Jenkins with node label parameters only it worked. What is different at my "real" Jenkins: the upstream job uses a Label (clearcase) to find any machine with ClearCase installed the downstream job has a node label as parameter called HOST_NAME. The upstream job explicitely passes HOST_NAME as ${NODE_NAME} I will try to attach the config.xml of my small demo jobs.

          Dirk Kuypers added a comment -

          Config Job B

          Dirk Kuypers added a comment - Config Job B
          Dirk Kuypers made changes -
          Attachment New: config.xml [ 24249 ]

            gbois Gregory Boissinot
            bruce Dirk Kuypers
            Votes:
            6 Vote for this issue
            Watchers:
            15 Start watching this issue

              Created:
              Updated: