From f99da9045d3eb1e4b1883cc1921caa9fa04d4bab Mon Sep 17 00:00:00 2001 From: Oliver Kurz Date: Wed, 24 Jul 2024 11:19:17 +0200 Subject: [PATCH] CI: Cover zypper erros with okurz/retry and exponential retries Related progress issue: https://progress.opensuse.org/issues/162848 --- tools/test_containers_compose | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tools/test_containers_compose b/tools/test_containers_compose index c5918908c0ed..5a2d47ef80bc 100755 --- a/tools/test_containers_compose +++ b/tools/test_containers_compose @@ -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