File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -267,6 +267,28 @@ function dedupe()
267267 ${HARDLINK} -c ${IMAGES_ROOT}
268268}
269269
270+ function validate_registry()
271+ {
272+ echo " Validating ISO registry completeness against zenkoversion.yaml..."
273+ local missing=0
274+
275+ while IFS= read -r image_ref ; do
276+ local image=" ${image_ref%:* } "
277+ local tag=" ${image_ref##*: } "
278+ local manifest=" ${IMAGES_ROOT} /${image} /${tag} /manifest.json"
279+ if [ ! -f " ${manifest} " ] ; then
280+ echo " ::error::Missing image in ISO registry: ${image} :${tag} "
281+ missing=$(( missing + 1 ))
282+ fi
283+ done < <( yq eval ' .. | select(has("image") and has("tag")) | .image + ":" + .tag' ${ISO_ROOT} /zenkoversion.yaml | sort -u)
284+
285+ if [ ${missing} -gt 0 ] ; then
286+ echo " ::error::${missing} image(s) referenced in zenkoversion.yaml are missing from the ISO registry. Aborting."
287+ exit 1
288+ fi
289+ echo " Registry validation passed: all images are present."
290+ }
291+
270292function build_registry_config()
271293{
272294 docker run \
354376get_dashboards
355377copy_iam_policies
356378copy_config
379+ validate_registry
357380dedupe
358381build_registry_config
359382build_iso
You can’t perform that action at this time.
0 commit comments