Skip to content

Commit

Permalink
Patch image_tag replacement (#110)
Browse files Browse the repository at this point in the history
* Patch image_tag replacement

* Refine regex
  • Loading branch information
Victoremepunto authored Sep 3, 2021
1 parent 12c8cc5 commit 9668507
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bonfire/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9668507

Please sign in to comment.