Skip to content
Snippets Groups Projects
Commit c10a7105 authored by Tamas Gal's avatar Tamas Gal :speech_balloon:
Browse files

Yapf

parent eaa94792
No related branches found
No related tags found
No related merge requests found
...@@ -10,25 +10,26 @@ REGISTRY_URL = 'docker.km3net.de' ...@@ -10,25 +10,26 @@ REGISTRY_URL = 'docker.km3net.de'
def main(): def main():
changed_dockerfiles = [f.a_path for f in git.Repo('.').index.diff("HEAD~1") changed_dockerfiles = [
if f.a_path.startswith("base/")] f.a_path for f in git.Repo('.').index.diff("HEAD~1")
if f.a_path.startswith("base/")
]
n_files = len(changed_dockerfiles) n_files = len(changed_dockerfiles)
if n_files == 0: if n_files == 0:
print("Nothing to do!") print("Nothing to do!")
exit(0) exit(0)
print("Processing {} dockerfile{}..." print("Processing {} dockerfile{}...".format(n_files,
.format(n_files, 's' if n_files else '')) 's' if n_files else ''))
for idx, fname in enumerate(changed_dockerfiles): for idx, fname in enumerate(changed_dockerfiles):
progress = "({}/{})".format(idx + 1, n_files) progress = "({}/{})".format(idx + 1, n_files)
steps = [("Building", steps = [("Building",
"docker build --pull -t {0}/{1} -f {1} . " "docker build --pull -t {0}/{1} -f {1} . ".format(
.format(REGISTRY_URL, fname)), REGISTRY_URL, fname)),
("Pushing", ("Pushing", "docker push {0}/{1}".format(REGISTRY_URL,
"docker push {0}/{1}" fname))]
.format(REGISTRY_URL, fname))]
print('-' * 79) print('-' * 79)
......
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