Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
configuration
Commits
bdde3a03
Commit
bdde3a03
authored
Aug 04, 2017
by
syed-awais-ali
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
get all dirs, and names fix
parent
d21e0788
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
util/parsefiles.py
+5
-5
No files found.
util/parsefiles.py
View file @
bdde3a03
...
...
@@ -339,19 +339,19 @@ def _get_modified_dockerfiles(files, git_dir):
:return:
"""
items
=
set
()
candidate_files
=
{
f
for
f
in
DOCKER_PATH_ROOT
.
glob
(
"*/*"
)}
candidate_files
=
{
f
for
f
in
DOCKER_PATH_ROOT
.
glob
(
"*
*
/*"
)}
for
f
in
files
:
file_path
=
pathlib2
.
Path
(
git_dir
,
f
)
if
file_path
in
candidate_files
:
items
.
add
(
_get_play_name
_from_dockerfile
(
file_path
))
items
.
add
(
_get_play_name
(
file_path
))
return
items
def
_get_play_name
_from_dockerfile
(
path
):
def
_get_play_name
(
path
):
"""
Gets name of play from the filepath, which is
the directory
preceeding occurence of the word "Dockerfile
".
the directory
following occurence of the word "build
".
Input:
path: A path to the changed file under docker/build dir
...
...
@@ -359,7 +359,7 @@ def _get_play_name_from_dockerfile(path):
# get individual parts of a file path
dirs
=
path
.
parts
# name of play
return
dirs
[
-
2
]
return
dirs
[
dirs
.
index
(
"build"
)
+
1
]
def
arg_parse
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment