load cached npm cache on jenkins workers

This commit is contained in:
Stuart Young
2018-09-17 14:15:02 -04:00
parent a0d8601ba8
commit fd580eab97

View File

@@ -26,6 +26,16 @@ if [ -e $HOME/edx-venv_clean.tar.gz ]; then
tar -C $HOME -xf $HOME/edx-venv_clean.tar.gz
fi
# Load the npm packages from the time the worker was built
# into the npm cache. This is an attempt to reduce the number
# of times that npm gets stuck during an installation, by
# reducing the number of packages that npm needs to fetch.
if [ -e $HOME/edx-npm-cache_clean.tar.gz ]; then
echo "Loading archived npm packages into the local npm cache"
rm -rf $HOME/.npm
tar -C $HOME -xf $HOME/edx-npm-cache_clean.tar.gz
fi
# Activate the Python virtualenv
source $HOME/edx-venv/bin/activate