diff --git a/publish_images.py b/publish_images.py index 5a8107eea1d77c6d7e5db11bbfc5080dfde285c8..bf8d27c35c7d7f4223935eb0059d0dc4b3444be5 100755 --- a/publish_images.py +++ b/publish_images.py @@ -5,6 +5,7 @@ import sys import time REGISTRY_URL = 'docker.km3net.de' +SKIP_PUSH = '-q' in sys.argv def get_changed_dockerfiles(): @@ -33,9 +34,12 @@ def main(): steps = [("Building", "docker build --pull -t {0}/{1} -f {1} . ".format( - REGISTRY_URL, fname)), - ("Pushing", "docker push {0}/{1}".format(REGISTRY_URL, - fname))] + REGISTRY_URL, fname))] + if not SKIP_PUSH: + steps.append(("Pushing", "docker push {0}/{1}".format(REGISTRY_URL, + fname))) + else: + print("Skiping push...") print('-' * 79)