From 9668507e6b15469380f20a0322b73dcebf4a300a Mon Sep 17 00:00:00 2001 From: Victor M Date: Fri, 3 Sep 2021 19:27:41 +0200 Subject: [PATCH] Patch image_tag replacement (#110) * Patch image_tag replacement * Refine regex --- bonfire/processor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bonfire/processor.py b/bonfire/processor.py index ec6d1e26..1120bc72 100644 --- a/bonfire/processor.py +++ b/bonfire/processor.py @@ -224,7 +224,7 @@ def _sub_image_tags(self, items): content = json.dumps(items) for image, image_tag in self.image_tag_overrides.items(): # easier to just re.sub on a whole string - content, subs = re.subn(rf"{image}:\w+", rf"{image}:{image_tag}", content) + content, subs = re.subn(rf"{image}:[-\w\.]+", rf"{image}:{image_tag}", content) if subs: log.info("replaced %d occurence(s) of image tag for image '%s'", subs, image) return json.loads(content)