Retry yarn package installs
We're seeing occasional npm install failures in jobs; retry the "yarn install" command if it fails. Also, pass the YARN_REGISTRY env var in the tox remote job. Change-Id: Ic80dccf0869ce805368f678eafcfdf48f8bf9bea
This commit is contained in:
parent
f65982cf86
commit
1736ea8ca2
13
tools/pip.sh
13
tools/pip.sh
|
@ -47,7 +47,18 @@ then
|
||||||
echo "Using yarn registry: ${YARN_REGISTRY}"
|
echo "Using yarn registry: ${YARN_REGISTRY}"
|
||||||
sed -i "s#https://registry.yarnpkg.com#${YARN_REGISTRY}#" yarn.lock
|
sed -i "s#https://registry.yarnpkg.com#${YARN_REGISTRY}#" yarn.lock
|
||||||
fi
|
fi
|
||||||
yarn install --verbose
|
|
||||||
|
# Be forgiving of package retrieval errors
|
||||||
|
attempts=0
|
||||||
|
until yarn install --verbose; do
|
||||||
|
((attempts++))
|
||||||
|
if [[ $attempts > 2 ]]
|
||||||
|
then
|
||||||
|
echo "Failed installing npm packages"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
yarn build
|
yarn build
|
||||||
if [[ -n "${YARN_REGISTRY}" ]]
|
if [[ -n "${YARN_REGISTRY}" ]]
|
||||||
then
|
then
|
||||||
|
|
Loading…
Reference in New Issue