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

DEVPROD-787: Retry Node installation on CI #498

Merged
merged 1 commit into from
Mar 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading