Skip to content

Commit

Permalink
Fix tag generation regression
Browse files Browse the repository at this point in the history
  • Loading branch information
filippomc committed Sep 18, 2024
1 parent 3def2a6 commit ff1faf9
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -311,10 +311,11 @@ def image_tag(self, image_name, build_context_path=None, dependencies=()):
ignore = set(DEFAULT_IGNORE)
if os.path.exists(ignore_path):
with open(ignore_path) as f:
ignore = ignore.union({line.strip() for line in f})
ignore = ignore.union({line.strip() for line in f if line.strip() and not line.startswith('#')})
logging.info(f"Ignoring {ignore}")
tag = generate_tag_from_content(build_context_path, ignore)
logging.info(f"Content hash: {tag}")
dependencies = dependencies or guess_build_dependencies_from_dockerfile(build_context_path)
tag = sha1((tag + "".join(self.all_images.get(n, '') for n in dependencies)).encode("utf-8")).hexdigest()
logging.info(f"Generated tag: {tag}")
app_name = image_name.split("/")[-1] # the image name can have a prefix
Expand Down

0 comments on commit ff1faf9

Please sign in to comment.