• 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

          Stefan Goor created issue -
          Stefan Goor made changes -
          Description Original: 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 be 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:

          {code}
          [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
          {code}
          New: 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:

          {code}
          [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
          {code}
          Stefan Goor made changes -
          Priority Original: Minor [ 4 ] New: Major [ 3 ]
          Nikolas Falco made changes -
          Link New: This issue duplicates JENKINS-27170 [ JENKINS-27170 ]
          Nikolas Falco made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Closed [ 6 ]
          Yves Schumann made changes -
          Link New: This issue relates to JENKINS-26583 [ JENKINS-26583 ]

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

              Created:
              Updated:
              Resolved: