]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
pybind/mgr/dashboard/frontend: add NPM_CACHEDIR envvar, use in bwc
authorDan Mick <dan.mick@redhat.com>
Wed, 13 Aug 2025 19:16:45 +0000 (12:16 -0700)
committerJohn Mulligan <jmulligan@redhat.com>
Thu, 21 Aug 2025 20:58:05 +0000 (16:58 -0400)
commit7513683b6711a121cd70049e5d873438b8bdd3fd
tree1f3593afdb604cb1a31b443b7b64ab3563b164c4
parente98bf37295358341511959cc19ee4d15cca0c036
pybind/mgr/dashboard/frontend: add NPM_CACHEDIR envvar, use in bwc

Add an optional NPM_CACHEDIR environment variable to serve as the
cache parameter for npm in the dashboard frontend build.  The idea
is to allow it to persist across builds so that we decrease the load
on registry.npmjs.org, which has been throttling our requests when
using build-with-container.py, and also hopefully improve the time
of the frontend npm operations.

build-with-container.py also grows a --npm-cache-path option to allow
setting it for container builds and passing the envvar to the build.

Fixes: https://tracker.ceph.com/issues/72298
Signed-off-by: Dan Mick <dan.mick@redhat.com>
(cherry picked from commit ad7e6117a9e99061a3ad7e03709dd31e34832966)
src/pybind/mgr/dashboard/frontend/CMakeLists.txt
src/script/build-with-container.py