Uploaded image for project: 'Infrastructure'
  1. Infrastructure
  2. INFRA-1139

Mirror of node dist and npm registry - and usage of it in plugin-pom

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: artifactory
    • Labels:
      None
    • Similar Issues:

      Description

      from the "misuse of funds" department, plugin builds fail sometimes due to nodejs.org/dist or npm registry being unavailable. 

      One recent case is: https://github.com/nodejs/nodejs.org/issues/1191

      In this case it was the distribution of binaries (node itself) that was unavailable. But often enough the npm registry may be unavailable as well. 

      The parent pom of plugins depends on the frontend-maven-plugin (the latter is NOT a jenkins project)

      The frontend-maven-plugin downloads specified versions of node so that javascript builds can run with the specified version. 

      Unfortunately the parent pom hard codes refrences to both nodejs/dist: 

      https://github.com/jenkinsci/plugin-pom/blob/master/pom.xml#L1080

       

      And registry.npmjs.org: 

      https://github.com/jenkinsci/plugin-pom/blob/master/pom.xml#L1094

       

      If INFRA was to offer a mirror of both dist and npm registry (no small ask) then this hard coding could be shifted so builds do not leave the jenkins repo to fetch things they need, vs "external" dependencies. 

       

      cc R. Tyler Croy

       

       

        Attachments

          Issue Links

            Activity

            Hide
            danielbeck Daniel Beck added a comment -

            Jesse Glick Yes, I added it just before I wrote my comment. Tyler asked and I delivered

            Is there a real download site for yarn, with directory index, or only GitHub?

            Show
            danielbeck Daniel Beck added a comment - Jesse Glick Yes, I added it just before I wrote my comment. Tyler asked and I delivered Is there a real download site for yarn, with directory index, or only GitHub?
            Show
            jglick Jesse Glick added a comment - So we need to mirror not just  http://nodejs.org/dist/  but also  http://registry.npmjs.org/npm/-/  and https://github.com/yarnpkg/yarn/releases/download/  according to https://github.com/eirslett/frontend-maven-plugin#installing-node-and-npm  (cross-checked in code).
            Hide
            danielbeck Daniel Beck added a comment -

            I set up https://repo.jenkins-ci.org/npm-tools/ and https://repo.jenkins-ci.org/nodejs-tools/

            yarn somehow didn't work (the URLs appear not {{curl}}able either), but since it's GitHub hosted we're not gaining anything from doing that, so I'm not investigating further.

            Show
            danielbeck Daniel Beck added a comment - I set up https://repo.jenkins-ci.org/npm-tools/ and https://repo.jenkins-ci.org/nodejs-tools/ yarn somehow didn't work (the URLs appear not {{curl}}able either), but since it's GitHub hosted we're not gaining anything from doing that, so I'm not investigating further.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            .mvn_exec_node
            .mvn_exec_yarn
            pom.xml
            yarn.lock
            http://jenkins-ci.org/commit/workflow-cps-plugin/5f871a45f47857e01fc8b80f5ff70447e20b8b1b
            Log:
            Merge pull request #128 from jglick/yarn

            INFRA-1139 Using yarn

            Compare: https://github.com/jenkinsci/workflow-cps-plugin/compare/457c0ec17b09...5f871a45f478

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: .mvn_exec_node .mvn_exec_yarn pom.xml yarn.lock http://jenkins-ci.org/commit/workflow-cps-plugin/5f871a45f47857e01fc8b80f5ff70447e20b8b1b Log: Merge pull request #128 from jglick/yarn INFRA-1139 Using yarn Compare: https://github.com/jenkinsci/workflow-cps-plugin/compare/457c0ec17b09...5f871a45f478
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            pom.xml
            http://jenkins-ci.org/commit/plugin-pom/278ba625d2af0eeea8154086639cc4840e6dfc43
            Log:
            Merge pull request #63 from jglick/eirslett-cache

            INFRA-1139 Load node and npm from the Jenkins Artifactory rather than a third-party server

            Compare: https://github.com/jenkinsci/plugin-pom/compare/ef094239a0e5...278ba625d2af

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: pom.xml http://jenkins-ci.org/commit/plugin-pom/278ba625d2af0eeea8154086639cc4840e6dfc43 Log: Merge pull request #63 from jglick/eirslett-cache INFRA-1139 Load node and npm from the Jenkins Artifactory rather than a third-party server Compare: https://github.com/jenkinsci/plugin-pom/compare/ef094239a0e5...278ba625d2af

              People

              • Assignee:
                danielbeck Daniel Beck
                Reporter:
                michaelneale Michael Neale
              • Votes:
                1 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: