Skip to content

Commit b98e55e

Browse files
authored
Only create manifests when images are pushed to registry (#2273)
1 parent 0473c8d commit b98e55e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tagging/apps/merge_tags.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,13 @@ def merge_tags(tag: str, push_to_registry: bool) -> None:
5757
except plumbum.ProcessExecutionError:
5858
LOGGER.info(f"Manifest {tag} doesn't exist")
5959

60-
LOGGER.info(f"Creating manifest for tag: {tag}")
61-
docker["manifest", "create", tag][all_platform_tags] & plumbum.FG
62-
LOGGER.info(f"Successfully created manifest for tag: {tag}")
63-
6460
if push_to_registry:
61+
# We need images to have been already pushed to the registry
62+
# before creating the manifest
63+
LOGGER.info(f"Creating manifest for tag: {tag}")
64+
docker["manifest", "create", tag][all_platform_tags] & plumbum.FG
65+
LOGGER.info(f"Successfully created manifest for tag: {tag}")
66+
6567
LOGGER.info(f"Pushing manifest for tag: {tag}")
6668
docker["manifest", "push", tag] & plumbum.FG
6769
LOGGER.info(f"Successfully merged and pushed tag: {tag}")

0 commit comments

Comments
 (0)