2222MARKDOWN_LINE_BREAK = "<br />"
2323
2424
25- def get_build_history_line (config : Config , filename : str , container : Container ) -> str :
25+ def get_build_history_line (config : Config , container : Container , filename : str ) -> str :
2626 LOGGER .info (f"Calculating build history line for image: { config .image } " )
2727
2828 taggers = get_taggers (config .image )
@@ -48,19 +48,19 @@ def get_build_history_line(config: Config, filename: str, container: Container)
4848
4949
5050def write_build_history_line (
51- config : Config , filename : str , container : Container
51+ config : Config , container : Container , filename : str
5252) -> None :
5353 LOGGER .info (f"Writing tags for image: { config .image } " )
5454
5555 path = config .hist_lines_dir / f"{ filename } .txt"
5656 path .parent .mkdir (parents = True , exist_ok = True )
57- build_history_line = get_build_history_line (config , filename , container )
57+ build_history_line = get_build_history_line (config , container , filename )
5858 path .write_text (build_history_line )
5959
6060 LOGGER .info (f"Build history line written to: { path } " )
6161
6262
63- def get_manifest (config : Config , commit_hash_tag : str , container : Container ) -> str :
63+ def get_manifest (config : Config , container : Container , commit_hash_tag : str ) -> str :
6464 LOGGER .info (f"Calculating manifest file for image: { config .image } " )
6565
6666 manifests = get_manifests (config .image )
@@ -87,13 +87,13 @@ def get_manifest(config: Config, commit_hash_tag: str, container: Container) ->
8787
8888
8989def write_manifest (
90- config : Config , filename : str , commit_hash_tag : str , container : Container
90+ config : Config , container : Container , * , filename : str , commit_hash_tag : str
9191) -> None :
9292 LOGGER .info (f"Writing manifest file for image: { config .image } " )
9393
9494 path = config .manifests_dir / f"{ filename } .md"
9595 path .parent .mkdir (parents = True , exist_ok = True )
96- manifest = get_manifest (config , commit_hash_tag , container )
96+ manifest = get_manifest (config , container , commit_hash_tag )
9797 path .write_text (manifest )
9898
9999 LOGGER .info (f"Manifest file wrtitten to: { path } " )
@@ -107,8 +107,10 @@ def write_all(config: Config) -> None:
107107 filename = f"{ file_prefix } -{ config .image } -{ commit_hash_tag } "
108108
109109 with DockerRunner (config .full_image ()) as container :
110- write_build_history_line (config , filename , container )
111- write_manifest (config , filename , commit_hash_tag , container )
110+ write_build_history_line (config , container , filename )
111+ write_manifest (
112+ config , container , filename = filename , commit_hash_tag = commit_hash_tag
113+ )
112114
113115 LOGGER .info (f"All files written for image: { config .image } " )
114116
0 commit comments