[CI] Delete node_modules in between bootstrap attempts (#117588)

This commit is contained in:
Brian Seeders 2021-11-04 17:22:49 -04:00 committed by GitHub
parent 0d9f9fd90a
commit 22a9382014
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,7 +6,17 @@ source .buildkite/scripts/common/util.sh
source .buildkite/scripts/common/setup_bazel.sh
echo "--- yarn install and bootstrap"
retry 2 15 yarn kbn bootstrap
if ! yarn kbn bootstrap; then
echo "bootstrap failed, trying again in 15 seconds"
sleep 15
# Most bootstrap failures will result in a problem inside node_modules that does not get fixed on the next bootstrap
# So, we should just delete node_modules in between attempts
rm -rf node_modules
echo "--- yarn install and bootstrap, attempt 2"
yarn kbn bootstrap
fi
###
### upload ts-refs-cache artifacts as quickly as possible so they are available for download