Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Commit

Permalink
DEVPROD-787: Retry Node installation on CI (#498)
Browse files Browse the repository at this point in the history
  • Loading branch information
minnakt authored Mar 1, 2024
1 parent 0dda172 commit b0b947f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .evergreen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,14 +227,22 @@ functions:
shell: bash
script: |
${PREPARE_SHELL}
# Fetch NVM and install it into this task's .nvm directory
# Once downloaded, source nvm and install yarn
git clone https://github.com/nvm-sh/nvm.git "$NVM_DIR"
cd "$NVM_DIR"
git checkout `git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1)`
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
cd -
nvm install --no-progress --default ${node_version}
# Retry the download for Node in case it flakes.
for i in {1..5}; do
nvm install --no-progress --default ${node_version}
[[ $? -eq 0 ]] && break
echo "Attempt $i of 5 to install Node failed"
sleep 10
done
npm install -g yarn
sym-link:
Expand Down

0 comments on commit b0b947f

Please sign in to comment.