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

Skip projects that are missing CI configuration

parent 88d81db4
Branches
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment