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
No related branches found
No related tags found
No related merge requests found
...@@ -21,6 +21,14 @@ def _fetch_dockerfile(gl, project, ref): ...@@ -21,6 +21,14 @@ def _fetch_dockerfile(gl, project, ref):
return None 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): def _remove_image_tag(name):
if ':' in name: if ':' in name:
return name.split(':')[0] return name.split(':')[0]
...@@ -62,6 +70,8 @@ def build_dependency_tree(gl, search_pattern=None, filter_pattern=None): ...@@ -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', logging.error('ERROR: could not find base image for %s',
project.path_with_namespace) project.path_with_namespace)
continue continue
if not _has_gitlab_ci(gl, project, 'master'):
continue
deps.setdefault(_remove_image_tag(base_image), []).append(project) deps.setdefault(_remove_image_tag(base_image), []).append(project)
return deps return deps
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment