Merge "Retry yarn package installs"

This commit is contained in:
Zuul 2021-05-03 21:03:52 +00:00 committed by Gerrit Code Review
commit 1f05bb5c11
2 changed files with 13 additions and 1 deletions

View File

@ -47,7 +47,18 @@ then
echo "Using yarn registry: ${YARN_REGISTRY}"
sed -i "s#https://registry.yarnpkg.com#${YARN_REGISTRY}#" yarn.lock
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
if [[ -n "${YARN_REGISTRY}" ]]
then

View File

@ -107,6 +107,7 @@ passenv =
OS_LOG_DEFAULTS
OS_STDERR_CAPTURE
OS_STDOUT_CAPTURE
YARN_REGISTRY
ZUUL_REMOTE_IPV4
ZUUL_SSH_KEY
ZUUL_TEST_ROOT