Commit a1f8985a authored by ale's avatar ale

Skip projects that are missing CI configuration

parent 88d81db4
......@@ -21,6 +21,14 @@ def _fetch_dockerfile(gl, project, ref):
return None
def _has_gitlab_ci(gl, project, ref):
try:
project.files.get(file_path='.gitlab-ci.yml', ref=ref)
return True
except:
return False
def _remove_image_tag(name):
if ':' in name:
return name.split(':')[0]
......@@ -62,6 +70,8 @@ def build_dependency_tree(gl, search_pattern=None, filter_pattern=None):
logging.error('ERROR: could not find base image for %s',
project.path_with_namespace)
continue
if not _has_gitlab_ci(gl, project, 'master'):
continue
deps.setdefault(_remove_image_tag(base_image), []).append(project)
return deps
......
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