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

Global npm packages of existing NodeJS installations are never refreshed

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: nodejs-plugin
    • Labels:
      None
    • Environment:
      Jenkins ver. 2.164.1
      NodeJS Plugin 1.2.9
    • Similar Issues:
    • Released As:
      1.3.0

      Description

      If I try to refresh global packages of an existing NodeJS installation nothing happens (no installation on the Jenkins master or agents).

      When or how is the NodeJS plugin triggered to install Node with its global packages?

        Attachments

          Activity

          Hide
          nfalco Nikolas Falco added a comment - - edited

          Which version of NodeJS did you select? Which operative system are you using? Could you setup a new tool with a totally new version of NodeJS and post the console log of a job with NodeJS configured?

          npm global package are triggered every time if the "refresh time" setup in the global tool page is expired (by default is 72 hours).

          [EnvInject] - Loading node environment variables.
          Building on master in workspace /var/lib/jenkins/jobs/test/workspace
          Unpacking https://nodejs.org/dist/v8.15.1/node-v8.15.1-linux-x64.tar.gz to /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node_8.x on Jenkins
          
          $ /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node_8.x/bin/npm install -g npm@6.7.0
          
          /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node_8.x/bin/npm -> /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node_8.x/lib/node_modules/npm/bin/npm-cli.js
          /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node_8.x/bin/npx -> /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node_8.x/lib/node_modules/npm/bin/npx-cli.js
          
          + npm@6.7.0
          added 52 packages from 7 contributors, removed 13 packages and updated 41 packages in 20.707s
          Finished: SUCCESS
          
          Show
          nfalco Nikolas Falco added a comment - - edited Which version of NodeJS did you select? Which operative system are you using? Could you setup a new tool with a totally new version of NodeJS and post the console log of a job with NodeJS configured? npm global package are triggered every time if the "refresh time" setup in the global tool page is expired (by default is 72 hours). [EnvInject] - Loading node environment variables. Building on master in workspace /var/lib/jenkins/jobs/test/workspace Unpacking https://nodejs.org/dist/v8.15.1/node-v8.15.1-linux-x64.tar.gz to /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node_8.x on Jenkins $ /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node_8.x/bin/npm install -g npm@6.7.0 /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node_8.x/bin/npm -> /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node_8.x/lib/node_modules/npm/bin/npm-cli.js /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node_8.x/bin/npx -> /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node_8.x/lib/node_modules/npm/bin/npx-cli.js + npm@6.7.0 added 52 packages from 7 contributors, removed 13 packages and updated 41 packages in 20.707s Finished: SUCCESS
          Hide
          nfalco Nikolas Falco added a comment -

          I got the issue that global packages are never refreshed if the NodeJS installation is not to be update.

          Show
          nfalco Nikolas Falco added a comment - I got the issue that global packages are never refreshed if the NodeJS installation is not to be update.
          Hide
          bkihm Benjamin Kihm added a comment - - edited

          Thanks for the fast reply.

          So I'm using Node.js version 8.11.4 and operating system is Ubuntu 18.04.1 LTS.

          For testing I setuped a new NodeJS installation (version 11.13.0) this installation works:

          [Pipeline] { (Declarative: Tool Install)
          [Pipeline] tool (hide)
          Unpacking https://nodejs.org/dist/v11.13.0/node-v11.13.0-linux-x64.tar.gz to /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NewNodeJS on Jenkins
          

          Then in the next step I added a global package (setting cache time to 0):

          [Pipeline] { (Declarative: Tool Install) (hide)
          [Pipeline] tool
          

          So I can confirm that the global packages are not refreshed.

          Show
          bkihm Benjamin Kihm added a comment - - edited Thanks for the fast reply. So I'm using Node.js version 8.11.4 and operating system is Ubuntu 18.04.1 LTS. For testing I setuped a new NodeJS installation (version 11.13.0) this installation works: [Pipeline] { (Declarative: Tool Install) [Pipeline] tool (hide) Unpacking https: //nodejs.org/dist/v11.13.0/node-v11.13.0-linux-x64.tar.gz to / var /lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NewNodeJS on Jenkins Then in the next step I added a global package (setting cache time to 0): [Pipeline] { (Declarative: Tool Install) (hide) [Pipeline] tool So I can confirm that the global packages are not refreshed.
          Hide
          bkihm Benjamin Kihm added a comment -

          Creating a new NodeJS Installation with initial global packages works:

          [Pipeline] { (Declarative: Tool Install)
          [Pipeline] tool
          Unpacking https://nodejs.org/dist/v11.13.0/node-v11.13.0-linux-x64.tar.gz to /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NewNodeJS2 on Jenkins
          $ /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NewNodeJS2/bin/npm install -g e2e-bridge-cli
          npm WARN deprecated clorox@1.0.3: Clorox is now Turbocolor!! - Please upgrade <3 'npm i turbocolor'
          npm WARN deprecated graceful-fs@3.0.11: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
          /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NewNodeJS2/bin/e2ebridge -> /var/lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NewNodeJS2/lib/node_modules/e2e-bridge-cli/cli.js
          + e2e-bridge-cli@2.1.0
          added 213 packages from 151 contributors in 20.019s
          

          Only refreshing existing installations fails.

          Show
          bkihm Benjamin Kihm added a comment - Creating a new NodeJS Installation with initial global packages works: [Pipeline] { (Declarative: Tool Install) [Pipeline] tool Unpacking https: //nodejs.org/dist/v11.13.0/node-v11.13.0-linux-x64.tar.gz to / var /lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NewNodeJS2 on Jenkins $ / var /lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NewNodeJS2/bin/npm install -g e2e-bridge-cli npm WARN deprecated clorox@1.0.3: Clorox is now Turbocolor!! - Please upgrade <3 'npm i turbocolor' npm WARN deprecated graceful-fs@3.0.11: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js / var /lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NewNodeJS2/bin/e2ebridge -> / var /lib/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NewNodeJS2/lib/node_modules/e2e-bridge-cli/cli.js + e2e-bridge-cli@2.1.0 added 213 packages from 151 contributors in 20.019s Only refreshing existing installations fails.

            People

            • Assignee:
              nfalco Nikolas Falco
              Reporter:
              bkihm Benjamin Kihm
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: