From 88d81db42579bc4123e156f615b0e9063b33dadd Mon Sep 17 00:00:00 2001 From: ale <ale@incal.net> Date: Fri, 1 Mar 2019 09:38:13 +0000 Subject: [PATCH] Do not fail if a pipeline is pending --- gitlab_docker_autodep/deps.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gitlab_docker_autodep/deps.py b/gitlab_docker_autodep/deps.py index 12f0f25..0d880f3 100644 --- a/gitlab_docker_autodep/deps.py +++ b/gitlab_docker_autodep/deps.py @@ -1,6 +1,7 @@ import gitlab import logging import re +import time _from_rx = re.compile(r'^FROM\s+(.*)$') @@ -92,9 +93,9 @@ 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 != 'success': - logging.error('ERROR: build failed for %s', - project.path_with_namespace) + if pipeline.status not in ('success', 'pending'): + logging.error('ERROR: build failed for %s (%s)', + project.path_with_namespace, pipeline) return if recurse: -- GitLab