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 +"""