Skip to content

Commit

Permalink
Retry on sporadic git clone failure
Browse files Browse the repository at this point in the history
This should avoid issues like observed in
https://openqa.opensuse.org/t3664694#step/build/4
  • Loading branch information
okurz committed Oct 22, 2023
1 parent bbf8015 commit c91c3bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/containers/build.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use base 'openQAcoretest';
use testapi;

sub run {
assert_script_run('git clone https://github.com/os-autoinst/openQA.git', timeout => 300);
assert_script_run('retry -s 30 -e -- git clone https://github.com/os-autoinst/openQA.git', timeout => 300);
assert_script_run("retry -s 30 -r 7 -e -- docker build openQA/container/$_ -t openqa_$_", timeout => 3800) for qw(webui worker);
assert_script_run('retry -s 30 -r 7 -e -- docker build openQA/container/openqa_data -t openqa_data', timeout => 3800);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/install/openqa_webui.pm
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ sub install_from_git {
systemctl start postgresql || systemctl status --no-pager postgresql
su - postgres -c 'createuser root'
su - postgres -c 'createdb -O root openqa'
git clone https://github.com/os-autoinst/openQA.git
retry -e -s 30 -- git clone https://github.com/os-autoinst/openQA.git
cd openQA
pkgs=$(for p in $(cpanfile-dump); do echo -n "perl($p) "; done); retry -e -s 30 -- zypper -n in -C $pkgs
cpanm -nq --installdeps .
Expand Down

0 comments on commit c91c3bf

Please sign in to comment.