Skip to content

Commit

Permalink
Fix nodeSetup, use node distBaseUrl instead of registry (#2208)
Browse files Browse the repository at this point in the history
(cherry picked from commit c2af5fa)
  • Loading branch information
HoustonPutman committed Jan 22, 2024
1 parent efbc74e commit a5a80b7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
8 changes: 5 additions & 3 deletions gradle/node.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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")

Expand Down
6 changes: 5 additions & 1 deletion help/localSettings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.

0 comments on commit a5a80b7

Please sign in to comment.