@@ -240,22 +240,6 @@ def get_manifest_meta_data_by_cname(
240240 and manifest_meta ["annotations" ]["architecture" ] == arch
241241 and manifest_meta ["platform" ]["os.version" ] == version
242242 ):
243- # Add description annotation if not present
244- if "org.opencontainers.image.description" not in manifest_meta ["annotations" ]:
245- features = manifest_meta ["annotations" ].get ("features" , "" )
246- arch = manifest_meta ["annotations" ]["architecture" ]
247- image_type = manifest_meta ["annotations" ].get ("image_type" , "" )
248- archive_type = manifest_meta ["annotations" ].get ("archive_type" , "" )
249-
250- description = (
251- f"GardenLinux image { cname } -{ version } -{ arch } \n "
252- f"Architecture: { arch } \n "
253- f"Features: { features } \n "
254- f"Image type: { image_type } \n "
255- f"Archive type: { archive_type } "
256- )
257- manifest_meta ["annotations" ]["org.opencontainers.image.description" ] = description
258-
259243 return manifest_meta
260244
261245 return None
@@ -578,6 +562,14 @@ def push_image_manifest(
578562 manifest_image ["annotations" ]["cname" ] = cname
579563 manifest_image ["annotations" ]["architecture" ] = architecture
580564 manifest_image ["annotations" ]["feature_set" ] = feature_set
565+ description = (
566+ f"Garden Linux image { cname } -{ version } -{ architecture } \n "
567+ f"Architecture: { architecture } \n "
568+ f"Features: { feature_set } \n "
569+ )
570+ manifest_image ["annotations" ][
571+ "org.opencontainers.image.description"
572+ ] = description
581573 attach_state (manifest_image ["annotations" ], "" )
582574
583575 config_annotations = {"cname" : cname , "architecture" : architecture }
0 commit comments