File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
src/python_gardenlinux_lib/oras Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -240,6 +240,22 @@ 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+
243259 return manifest_meta
244260
245261 return None
You can’t perform that action at this time.
0 commit comments