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

Not respecting configuration in regards of global modules

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: nodejs-plugin
    • Labels:
      None
    • Environment:
      Jenkins 2.44 on macOS
    • Similar Issues:

      Description

      Version: 1.0.1

      Current state

      If I have a nodejs installation configured to not install any global modules, it will not be respected.
      The command will anyway execute with "npm install -g" which is not valid.

      $ /Users/<user>/.jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NodeJS_6.9.4/bin/npm install -g 
      npm ERR! Usage:
      npm ERR!     npm cache add <tarball-url>
      npm ERR!     npm cache add <pkg>@<ver>
      npm ERR!     npm cache add <tarball>
      npm ERR!     npm cache add <folder>
      npm ERR! 
      

      Expected behavior

      The command "npm install -g " will not run if there is no configuration for global modules.

        Attachments

          Activity

          Hide
          nfalco Nikolas Falco added a comment - - edited

          Alexander Komarov let me try to reproduce your setup, without docker (master linux -> slave linux) and your job/global tool configuration.

          Just to clarify if you do not have jenkins.plugins.nodejs.tools.NodeJSInstallation.xml file in the home of master jenkins near the others persistence file:

          • disk-usage -> hudson.plugins.disk_usage.DiskUsageProperty.xml
          • Maven -> hudson.tasks.Maven.xml
          • Ant -> hudson.tasks.Ant.xml

          If you reboot Jenkins instance NodeJS global tool configuration will be lost (you have to redefine them). Your it's a very unreproducible strange case.

          Anyway the case of npm install -g with empty list of packages was fixed in master.

          Show
          nfalco Nikolas Falco added a comment - - edited Alexander Komarov let me try to reproduce your setup, without docker (master linux -> slave linux) and your job/global tool configuration. Just to clarify if you do not have jenkins.plugins.nodejs.tools.NodeJSInstallation.xml file in the home of master jenkins near the others persistence file: disk-usage -> hudson.plugins.disk_usage.DiskUsageProperty.xml Maven -> hudson.tasks.Maven.xml Ant -> hudson.tasks.Ant.xml If you reboot Jenkins instance NodeJS global tool configuration will be lost (you have to redefine them). Your it's a very unreproducible strange case. Anyway the case of npm install -g with empty list of packages was fixed in master.
          Hide
          nfalco Nikolas Falco added a comment -

          I got it.

          A regression in master code due rework of JENKINS-40624 cause command not found exception in case of execution master -> slave

          Show
          nfalco Nikolas Falco added a comment - I got it. A regression in master code due rework of JENKINS-40624 cause command not found exception in case of execution master -> slave
          Hide
          nfalco Nikolas Falco added a comment -

          Fix in master

          Show
          nfalco Nikolas Falco added a comment - Fix in master
          Hide
          akom Alexander Komarov added a comment -

          Confirmed, works for me (master)

          Show
          akom Alexander Komarov added a comment - Confirmed, works for me (master)
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Nikolas Falco
          Path:
          src/test/java/jenkins/plugins/nodejs/NodeJSInstallerTest.java
          http://jenkins-ci.org/commit/nodejs-plugin/f0b500baeaa7cee21c1c519c951f9a26a3564655
          Log:
          JENKINS-41876 Replaced with original correct test.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nikolas Falco Path: src/test/java/jenkins/plugins/nodejs/NodeJSInstallerTest.java http://jenkins-ci.org/commit/nodejs-plugin/f0b500baeaa7cee21c1c519c951f9a26a3564655 Log: JENKINS-41876 Replaced with original correct test.

            People

            • Assignee:
              nfalco Nikolas Falco
              Reporter:
              dweber019 David Weber
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: