Skip to content

Commit

Permalink
CI: Cover zypper erros with okurz/retry and exponential retries
Browse files Browse the repository at this point in the history
  • Loading branch information
okurz committed Jul 24, 2024
1 parent 51f9636 commit f99da90
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tools/test_containers_compose
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,16 @@ wait_until() {
}

setup_containers() {
"$thisdir"/retry sudo docker compose build
if command -v retry >/dev/null; then
retry="retry -e -s 30 -r 7"
else
curl -sS https://raw.githubusercontent.com/okurz/retry/main/retry > retry
chmod +x retry
retry="$PWD/retry -e -s 30 -r 7"
fi
$retry sudo docker compose build
exit_code=""
"$thisdir"/retry sudo MOJO_CLIENT_DEBUG=1 docker compose up -d || exit_code=$?
$retry sudo MOJO_CLIENT_DEBUG=1 docker compose up -d || exit_code=$?
if [[ -n $exit_code ]]; then
echo "docker compose exited with non-zero code $exit_code, showing logs:"
docker compose logs
Expand Down

0 comments on commit f99da90

Please sign in to comment.