Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gitlab-deps
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pipelines
tools
gitlab-deps
Commits
a1f8985a
Commit
a1f8985a
authored
6 years ago
by
ale
Browse files
Options
Downloads
Patches
Plain Diff
Skip projects that are missing CI configuration
parent
88d81db4
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gitlab_docker_autodep/deps.py
+10
-0
10 additions, 0 deletions
gitlab_docker_autodep/deps.py
with
10 additions
and
0 deletions
gitlab_docker_autodep/deps.py
+
10
−
0
View file @
a1f8985a
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment