mirror of
https://github.com/certbot/certbot.git
synced 2026-06-06 23:32:06 -04:00
Retry on build failures
This commit is contained in:
parent
3b05fb17a5
commit
32f6baec9e
1 changed files with 4 additions and 2 deletions
|
|
@ -43,10 +43,12 @@ def _build_snap(target, archs, status):
|
|||
retry = 3
|
||||
while retry:
|
||||
exit_code = _execute_build(target, archs, status, workspace)
|
||||
|
||||
print(f'Build {target} for {"".join(archs)} (attempt {4-retry}/3) ended with exit code {exit_code}.')
|
||||
sys.stdout.flush()
|
||||
# Do not retry if the snapcraft remote-build command has not been interrupted.
|
||||
if exit_code == 0:
|
||||
|
||||
# Retry if the snapcraft remote-build command has been interrupted.
|
||||
if exit_code == 0 and 'Failed to build' not in status[target].values():
|
||||
break
|
||||
|
||||
retry = retry - 1
|
||||
|
|
|
|||
Loading…
Reference in a new issue