Skip to content

Commit ff1faf9

Browse files
committed
Fix tag generation regression
1 parent 3def2a6 commit ff1faf9

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tools/deployment-cli-tools/ch_cli_tools/configurationgenerator.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,10 +311,11 @@ def image_tag(self, image_name, build_context_path=None, dependencies=()):
311311
ignore = set(DEFAULT_IGNORE)
312312
if os.path.exists(ignore_path):
313313
with open(ignore_path) as f:
314-
ignore = ignore.union({line.strip() for line in f})
314+
ignore = ignore.union({line.strip() for line in f if line.strip() and not line.startswith('#')})
315315
logging.info(f"Ignoring {ignore}")
316316
tag = generate_tag_from_content(build_context_path, ignore)
317317
logging.info(f"Content hash: {tag}")
318+
dependencies = dependencies or guess_build_dependencies_from_dockerfile(build_context_path)
318319
tag = sha1((tag + "".join(self.all_images.get(n, '') for n in dependencies)).encode("utf-8")).hexdigest()
319320
logging.info(f"Generated tag: {tag}")
320321
app_name = image_name.split("/")[-1] # the image name can have a prefix

0 commit comments

Comments
 (0)