Commit 58567568 authored by ale's avatar ale

Catch rebuild errors and continue

parent a1f8985a
......@@ -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' % (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment