• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • nodejs-plugin
    • None
    • Amazon Linux EC2 instance using Jenkins ver. 2.32.2 and NodeJS plugin version 1.0.1

      I have followed the instructions on the "Usage" section of https://wiki.jenkins-ci.org/display/JENKINS/NodeJS+Plugin which had worked for me in the past but on 2 recently created instances the path is not being updated with the commands.

      When using the simple shell example with the build environment to provide the node and npm bin folder to the path, I get the following output and error:

      [EnvInject] - Loading node environment variables.
      Building in workspace /var/lib/jenkins/workspace/Test nodejs
      $ /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/v0.12.13/bin/npm install -g bower grunt-cli
      /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/v0.12.13/bin/grunt -> /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/v0.12.13/lib/node_modules/grunt-cli/bin/grunt
      /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/v0.12.13/bin/bower -> /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/v0.12.13/lib/node_modules/bower/bin/bower
      grunt-cli@1.2.0 /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/v0.12.13/lib/node_modules/grunt-cli
      ├── grunt-known-options@1.1.0
      ├── nopt@3.0.6 (abbrev@1.0.9)
      ├── resolve@1.1.7
      └── findup-sync@0.3.0 (glob@5.0.15)
      
      bower@1.8.0 /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/v0.12.13/lib/node_modules/bower
      [Test nodejs] $ /bin/sh -xe /tmp/hudson7648911894139277606.sh
      + echo /sbin:/usr/sbin:/bin:/usr/bin
      /sbin:/usr/sbin:/bin:/usr/bin
      + node --version
      /tmp/hudson7648911894139277606.sh: line 3: node: command not found
      Build step 'Execute shell' marked build as failure
      Finished: FAILURE
      

          [JENKINS-41762] NodeJS plugin not updating PATH as expected

          Nikolas Falco added a comment -

          This sound like duplicate of JENKINS-27170

          Do you have EnvInject plugin installed?
          If yes than you fall in JENKINS-26583

          Workaround is remove EnvInject plugin, or make a custom build of workaround-26583 branch. (this branch will never merge into master, it's a EnvInject plugin issue not nodejs)

          Nikolas Falco added a comment - This sound like duplicate of JENKINS-27170 Do you have EnvInject plugin installed? If yes than you fall in JENKINS-26583 Workaround is remove EnvInject plugin, or make a custom build of workaround-26583 branch. (this branch will never merge into master, it's a EnvInject plugin issue not nodejs)

          Stefan Goor added a comment - - edited

          Thanks for the response, Yes I have EnvInject installed as a dependency of the Multijob plugin but I think I can do things in a different way so I don't need the multijob plugin to get around the issue.

          Thanks for your help.

          Stefan Goor added a comment - - edited Thanks for the response, Yes I have EnvInject installed as a dependency of the Multijob plugin but I think I can do things in a different way so I don't need the multijob plugin to get around the issue. Thanks for your help.

          Stefan Goor added a comment -

          I can confirm that removing the Multijob and its dependent EnvInject plugin resolved the problem so it does appear to be a duplicate of JENKINS-27170.

          Thanks again.

          Stefan Goor added a comment - I can confirm that removing the Multijob and its dependent EnvInject plugin resolved the problem so it does appear to be a duplicate of JENKINS-27170 . Thanks again.

            Unassigned Unassigned
            stefangoor Stefan Goor
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: