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

NVM_NODEJS_ORG_MIRROR=null causes `nvm install` to always fail

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      This was probably introduced in JENKINS-40268

      Now if no `NVM_NODEJS_ORG_MIRROR` is set (none should be set or needed by default) the value `null` causes all installs and builds to fail, even if the correct version is already installed.

       

      Relevant console output log:

       

      [etx8-web] $ bash -c "export > before.env"
      [etx8-web] $ bash -c "source /home/jenkins/.nvm/nvm.sh && NVM_NODEJS_ORG_MIRROR=null nvm install 6.9.1 && nvm use 6.9.1 && export > nvm.env"
      Version '6.9.1' not found - try `nvm ls-remote` to browse available versions.
      $ ssh-agent -k
      unset SSH_AUTH_SOCK;
      unset SSH_AGENT_PID;
      echo Agent pid 19849 killed;
      [ssh-agent] Stopped.
      ERROR: Failed to fork bash 
      Archiving artifacts
      Finished: FAILURE

       

       

      To avoid the problem I think I will have to manually set the environment variable in all of my builds that use the NVM wrapper.

        Attachments

          Issue Links

            Activity

            Hide
            atoms Tomas Salazar added a comment -

            Hi, I'm having problems to replicate this issue, I suppose that this is only happening with projects that were using the previous version.

             

            Show
            atoms Tomas Salazar added a comment - Hi, I'm having problems to replicate this issue, I suppose that this is only happening with projects that were using the previous version.  
            Hide
            thom_nic Thom Nichols added a comment -

            Is v0.1.2 not the latest version?

             

            Noticed that if I manually set NVM_NODEJS_ORG_VERSION=http://nodejs.org/dist it then works correctly but all the fields were blank. 

            Of course I just looked at two of my projects again and now all 3 of the fields are non-blank even though I did not set them.  Perhaps a plugin upgrade quirk for projects that were using the nvm plugin prior to upgrade?

            Show
            thom_nic Thom Nichols added a comment - Is v0.1.2 not the latest version?   Noticed that if I manually set NVM_NODEJS_ORG_VERSION= http://nodejs.org/dis t it then works correctly but all the fields were blank.  Of course I just looked at two of my projects again and now all 3 of the fields are non-blank even though I did not set them.  Perhaps a plugin upgrade quirk for projects that were using the nvm plugin prior to upgrade?
            Hide
            atoms Tomas Salazar added a comment -

            The plugin falls to default settings if you don't fill that fields, but the problem is because the default setter is only triggered when the object is saved, so if somebody has projects configurated with the old version it will fail. I going to send the fix at the weekend.

            If you open and save the project it must fix the problem.

            Show
            atoms Tomas Salazar added a comment - The plugin falls to default settings if you don't fill that fields, but the problem is because the default setter is only triggered when the object is saved, so if somebody has projects configurated with the old version it will fail. I going to send the fix at the weekend. If you open and save the project it must fix the problem.
            Hide
            thom_nic Thom Nichols added a comment -

            Yup after I saved the build configuration the values showed up and everything returned to normal.  Thanks for the quick response!

            Show
            thom_nic Thom Nichols added a comment - Yup after I saved the build configuration the values showed up and everything returned to normal.  Thanks for the quick response!
            Show
            atoms Tomas Salazar added a comment - https://github.com/jenkinsci/nvm-wrapper-plugin/pull/6
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Tomas Salazar
            Path:
            src/main/java/org/jenkinsci/plugins/nvm/NvmWrapperUtil.java
            http://jenkins-ci.org/commit/nvm-wrapper-plugin/dcf30736d17b7e8accbbf35e4020443571e99255
            Log:
            Merge pull request #6 from atomsfat/bug/JENKINS-45079-NVM_NODEJS_ORG_MIRROR-null

            Solve NPE on upgraded installations

            Compare: https://github.com/jenkinsci/nvm-wrapper-plugin/compare/741145d2af70...dcf30736d17b

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Tomas Salazar Path: src/main/java/org/jenkinsci/plugins/nvm/NvmWrapperUtil.java http://jenkins-ci.org/commit/nvm-wrapper-plugin/dcf30736d17b7e8accbbf35e4020443571e99255 Log: Merge pull request #6 from atomsfat/bug/ JENKINS-45079 -NVM_NODEJS_ORG_MIRROR-null Solve NPE on upgraded installations Compare: https://github.com/jenkinsci/nvm-wrapper-plugin/compare/741145d2af70...dcf30736d17b
            Hide
            atoms Tomas Salazar added a comment -

            Solved in 0.1.3

            Show
            atoms Tomas Salazar added a comment - Solved in 0.1.3

              People

              Assignee:
              atoms Tomas Salazar
              Reporter:
              thom_nic Thom Nichols
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: