You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ho...@apache.org on 2024/01/22 19:46:28 UTC

(solr) branch branch_9_5 updated: Fix nodeSetup, use node distBaseUrl instead of registry (#2208)

This is an automated email from the ASF dual-hosted git repository.

houston pushed a commit to branch branch_9_5
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/branch_9_5 by this push:
     new 31f1085b6eb Fix nodeSetup, use node distBaseUrl instead of registry (#2208)
31f1085b6eb is described below

commit 31f1085b6eba0aab329ea3a200ef2ac0a63df73e
Author: Houston Putman <ho...@apache.org>
AuthorDate: Mon Jan 22 12:22:48 2024 -0600

    Fix nodeSetup, use node distBaseUrl instead of registry (#2208)
    
    (cherry picked from commit c2af5fa1a07b6dfbfcb5c190264a506fedcecf2e)
---
 gradle/node.gradle     | 8 +++++---
 help/localSettings.txt | 6 +++++-
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/gradle/node.gradle b/gradle/node.gradle
index 6bec66456e0..41a853799c5 100644
--- a/gradle/node.gradle
+++ b/gradle/node.gradle
@@ -23,9 +23,6 @@ configure([project(":solr:packaging"), project(":solr:solr-ref-guide"), project(
         tasks.npmSetup {
             args.addAll(['--registry', npmRegistry])
         }
-        tasks.nodeSetup {
-            args.addAll(['--registry', npmRegistry])
-        }
     }
 
     ext {
@@ -37,6 +34,11 @@ configure([project(":solr:packaging"), project(":solr:solr-ref-guide"), project(
         download = true
         version = "16.15.1" // LTS
 
+        def nodeDistUrl = "${ -> propertyOrEnvOrDefault("solr.node.distUrl", "SOLR_NODE_DIST_URL", '') }"
+        if (!nodeDistUrl.isEmpty()) {
+            distBaseUrl = nodeDistUrl
+        }
+
         // The directory where Node.js is unpacked (when download is true)
         workDir = file("${project.ext.rootNodeDir}/nodejs")
 
diff --git a/help/localSettings.txt b/help/localSettings.txt
index 3c261fd234d..a0f66f5ed58 100644
--- a/help/localSettings.txt
+++ b/help/localSettings.txt
@@ -11,10 +11,14 @@ Building without access to the internet
 ---------------------------------------
 
 -- Node --
-There are a few tasks that rely on downloading node tools from NPM.
+There are a few tasks that rely on downloading node itself and node tools from NPM.
 These include the Reference Guide build, the integration (e2e) tests and the webapp build.
 Some of these can be disabled, however other tasks such as building the solr webapp often cannot be disabled.
 
+In order to set a Node Distribution base URL for Gradle to download Node from, please use either:
+- The "SOLR_NODE_DIST_URL" environment variable
+- The "-Psolr.node.distUrl" Gradle property.
+
 In order to set a NPM registry for Gradle to connect to, please use either:
 - The "SOLR_NPM_REGISTRY" environment variable
 - The "-Psolr.npm.registry" Gradle property.