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

install global package don't use default proxy

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: nodejs-plugin
    • Labels:
      None
    • Environment:
      centos 6.5
    • Similar Issues:

      Description

      Hi!
      I found this issue:
      I specified the list of packages to install globally in system configuration of Jenkins
      (Jenkins-configuration-> nodeJS paragraph).
      When a job that use nodeJS is built, the job try to install the package globally but npm doesn't use any proxy configuration (neither jenkins' proxy configuration, neither system proxy environment variables). So, if you under corporate proxy, the installation is not working and ends with ETIMEOUT.

        Attachments

          Issue Links

            Activity

            Hide
            nfalco Nikolas Falco added a comment -

            As workaround have a look here.

            Define the HTTPS_PROXY and HTTP_PROXY as global variable enviroment in jenkins configure path.

            Anyway I'm fixing the issue adding those variable in the enviroment where npm perform the npm install -g with the same proxy value used to download the installer from nodejs.org.

            Show
            nfalco Nikolas Falco added a comment - As workaround have a look here . Define the HTTPS_PROXY and HTTP_PROXY as global variable enviroment in jenkins configure path. Anyway I'm fixing the issue adding those variable in the enviroment where npm perform the npm install -g with the same proxy value used to download the installer from nodejs.org.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Nikolas Falco
            Path:
            src/main/java/jenkins/plugins/nodejs/NodeJSConstants.java
            src/main/java/jenkins/plugins/nodejs/tools/NodeJSInstaller.java
            src/test/java/jenkins/plugins/nodejs/NodeJSInstallerTest.java
            src/test/java/jenkins/plugins/nodejs/tools/NodeJSInstallerProxyTest.java
            src/test/java/jenkins/plugins/nodejs/tools/NodeJSInstallerTest.java
            http://jenkins-ci.org/commit/nodejs-plugin/625be457227bccd929092f5fb403137306acf526
            Log:
            [FIX JENKINS-29266] Add HTTP_PROXY and HTTPS_PROXY variables to the process environment that execute the npm install of global packages.
            The proxy URL is the same used to download the nodejs installer and could be setup in Jenkins configuration.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nikolas Falco Path: src/main/java/jenkins/plugins/nodejs/NodeJSConstants.java src/main/java/jenkins/plugins/nodejs/tools/NodeJSInstaller.java src/test/java/jenkins/plugins/nodejs/NodeJSInstallerTest.java src/test/java/jenkins/plugins/nodejs/tools/NodeJSInstallerProxyTest.java src/test/java/jenkins/plugins/nodejs/tools/NodeJSInstallerTest.java http://jenkins-ci.org/commit/nodejs-plugin/625be457227bccd929092f5fb403137306acf526 Log: [FIX JENKINS-29266] Add HTTP_PROXY and HTTPS_PROXY variables to the process environment that execute the npm install of global packages. The proxy URL is the same used to download the nodejs installer and could be setup in Jenkins configuration.

              People

              • Assignee:
                nfalco Nikolas Falco
                Reporter:
                massimone88 Stefano Massimone
              • Votes:
                2 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: