Skip to content
Snippets Groups Projects
Commit 58567568 authored by ale's avatar ale
Browse files

Catch rebuild errors and continue

parent a1f8985a
Branches
No related tags found
No related merge requests found
......@@ -102,11 +102,16 @@ def rebuild_deps(gitlab_url, registry_hostname, gitlab_token,
logging.info('rebuilding %s', project.path_with_namespace)
if not dry_run:
pipeline = rebuild(project, wait)
if pipeline.status not in ('success', 'pending'):
logging.error('ERROR: build failed for %s (%s)',
project.path_with_namespace, pipeline)
return
try:
pipeline = rebuild(project, wait)
if pipeline.status not in ('success', 'pending'):
logging.error('ERROR: build failed for %s (status: %s)',
project.path_with_namespace, pipeline.status)
continue
except gitlab.exceptions.GitlabError as e:
logging.error('ERROR: gitlab error: %s: %s',
project.path_with_namespace, str(e))
continue
if recurse:
image_name = '%s/%s' % (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment