]> git.apps.os.sepia.ceph.com Git - ceph-ci.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 <phlogistonjohn@asynchrono.us>
Fri, 22 Aug 2025 14:48:37 +0000 (10:48 -0400)
commitc8841d64c03cf46dcc8e6123ffe364006754bb0b
tree3ce3ea1ae04bea4dd51984bf6cf39ba22b1cf6c1
parent78fe267fdc9787bd124cffff65660b3c100cd738
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