Skip to content

Commit

Permalink
Add more logs in tagging
Browse files Browse the repository at this point in the history
  • Loading branch information
mathbunnyru committed Feb 21, 2025
1 parent d9b6333 commit 1bbab5c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
1 change: 1 addition & 0 deletions tagging/apps/merge_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ def merge_tags(
LOGGER.info(f"Found images: {existing_images}")
docker["manifest", "create", tag][existing_images] & plumbum.FG
docker["manifest", "push", tag] & plumbum.FG
LOGGER.info(f"Successfully merged and pushed tag: {tag}")


if __name__ == "__main__":
Expand Down
10 changes: 7 additions & 3 deletions tagging/apps/write_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ def write_build_history_line(
)
build_history_line = f"| {date_column} | {image_column} | {links_column} |"
hist_lines_dir.mkdir(parents=True, exist_ok=True)
(hist_lines_dir / f"{filename}.txt").write_text(build_history_line)
file = hist_lines_dir / f"{filename}.txt"
file.write_text(build_history_line)
LOGGER.info(f"Build history line written to: {file}")


def write_manifest_file(
Expand Down Expand Up @@ -79,7 +81,9 @@ def write_manifest_file(
markdown_content = "\n\n".join(markdown_pieces) + "\n"

manifests_dir.mkdir(parents=True, exist_ok=True)
(manifests_dir / f"{filename}.md").write_text(markdown_content)
file = manifests_dir / f"{filename}.md"
file.write_text(markdown_content)
LOGGER.info(f"Manifest file written to: {file}")


def write_manifest(
Expand All @@ -92,7 +96,7 @@ def write_manifest(
manifests_dir: Path,
repository: str,
) -> None:
LOGGER.info(f"Creating manifests for image: {short_image_name}")
LOGGER.info(f"Creating manifests for image: {registry}/{owner}/{short_image_name}")
taggers, manifests = get_taggers_and_manifests(short_image_name)

image = f"{registry}/{owner}/{short_image_name}:latest"
Expand Down
6 changes: 4 additions & 2 deletions tagging/apps/write_tags_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def write_tags_file(
"""
Writes tags file for the image <registry>/<owner>/<short_image_name>:latest
"""
LOGGER.info(f"Tagging image: {short_image_name}")
LOGGER.info(f"Tagging image: {registry}/{owner}/{short_image_name}")
taggers, _ = get_taggers_and_manifests(short_image_name)

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


if __name__ == "__main__":
Expand Down

0 comments on commit 1bbab5c

Please sign in to comment.