Skip to content

Commit

Permalink
Use retries instead
Browse files Browse the repository at this point in the history
Signed-off-by: Addisu Z. Taddese <[email protected]>
  • Loading branch information
azeey committed Oct 12, 2023
1 parent 73f57f4 commit 5696800
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions jenkins-scripts/lib/_homebrew_cleanup.bash
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,15 @@ git stash && git clean -d -f
${BREW_BINARY} audit cmake || restore_brew
popd 2> /dev/null

# Remove any locks to avoid any errors about another active Homebrew process being active.
rm -rf $(${BREW_BINARY} --prefix)/var/homebrew/locks
# There might be a background process that blocks `brew update`, so we try to
# run it several times until it succeeds.
# See https://github.com/Homebrew/brew/issues/1155
brew_update_retry_count=0
until brew update || (( brew_update_retry_count++ > 6 ))
do
brew update
sleep 10
done

# test-bot needs variables and does not work just with config not sure why
export GIT_AUTHOR_NAME="OSRF Build Bot"
Expand Down

0 comments on commit 5696800

Please sign in to comment.