From ba6aa6db5294ecd7044066a1b6b4e8107b94f2ee Mon Sep 17 00:00:00 2001 From: Fridolin Pokorny Date: Tue, 4 Jul 2017 14:51:29 +0200 Subject: [PATCH] Unify default hash lenght --- saasherder/saasherder.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/saasherder/saasherder.py b/saasherder/saasherder.py index 9660c45..bc38a45 100644 --- a/saasherder/saasherder.py +++ b/saasherder/saasherder.py @@ -133,9 +133,7 @@ def process_image_tag(self, services, output_dir, force=False): continue output = "" template_file = self.get_template_file(s) - l = 6 #How many chars to use from hash - if s.get("hash_length"): - l = s.get("hash_length") + l = s.get("hash_length", 7) #How many chars to use from hash tag = "latest" if s["hash"] == "master" else s["hash"][:l] parameters = [{"name": "IMAGE_TAG", "value": tag}] service_params = s.get("parameters", {}) @@ -207,4 +205,4 @@ def print_objects(self, objects): image = "%s:%s" % (image, s.get("hash")[0:6]) c["image"] = image anymarkup.serialize_file(template, os.path.join(output_dir, "%s.yaml" % s.get("name"))) -""" \ No newline at end of file +"""