Skip to content

Commit 1bbab5c

Browse files
committed
Add more logs in tagging
1 parent d9b6333 commit 1bbab5c

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

tagging/apps/merge_tags.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ def merge_tags(
5656
LOGGER.info(f"Found images: {existing_images}")
5757
docker["manifest", "create", tag][existing_images] & plumbum.FG
5858
docker["manifest", "push", tag] & plumbum.FG
59+
LOGGER.info(f"Successfully merged and pushed tag: {tag}")
5960

6061

6162
if __name__ == "__main__":

tagging/apps/write_manifest.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ def write_build_history_line(
5050
)
5151
build_history_line = f"| {date_column} | {image_column} | {links_column} |"
5252
hist_lines_dir.mkdir(parents=True, exist_ok=True)
53-
(hist_lines_dir / f"{filename}.txt").write_text(build_history_line)
53+
file = hist_lines_dir / f"{filename}.txt"
54+
file.write_text(build_history_line)
55+
LOGGER.info(f"Build history line written to: {file}")
5456

5557

5658
def write_manifest_file(
@@ -79,7 +81,9 @@ def write_manifest_file(
7981
markdown_content = "\n\n".join(markdown_pieces) + "\n"
8082

8183
manifests_dir.mkdir(parents=True, exist_ok=True)
82-
(manifests_dir / f"{filename}.md").write_text(markdown_content)
84+
file = manifests_dir / f"{filename}.md"
85+
file.write_text(markdown_content)
86+
LOGGER.info(f"Manifest file written to: {file}")
8387

8488

8589
def write_manifest(
@@ -92,7 +96,7 @@ def write_manifest(
9296
manifests_dir: Path,
9397
repository: str,
9498
) -> None:
95-
LOGGER.info(f"Creating manifests for image: {short_image_name}")
99+
LOGGER.info(f"Creating manifests for image: {registry}/{owner}/{short_image_name}")
96100
taggers, manifests = get_taggers_and_manifests(short_image_name)
97101

98102
image = f"{registry}/{owner}/{short_image_name}:latest"

tagging/apps/write_tags_file.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def write_tags_file(
2525
"""
2626
Writes tags file for the image <registry>/<owner>/<short_image_name>:latest
2727
"""
28-
LOGGER.info(f"Tagging image: {short_image_name}")
28+
LOGGER.info(f"Tagging image: {registry}/{owner}/{short_image_name}")
2929
taggers, _ = get_taggers_and_manifests(short_image_name)
3030

3131
image = f"{registry}/{owner}/{short_image_name}:latest"
@@ -45,7 +45,9 @@ def write_tags_file(
4545
f"{registry}/{owner}/{short_image_name}:{tags_prefix}-{tag_value}"
4646
)
4747
tags_dir.mkdir(parents=True, exist_ok=True)
48-
(tags_dir / filename).write_text("\n".join(tags))
48+
file = tags_dir / filename
49+
file.write_text("\n".join(tags))
50+
LOGGER.info(f"Tags file written to: {file}")
4951

5052

5153
if __name__ == "__main__":

0 commit comments

Comments
 (0)