+if ! [[ ${#images[@]} -eq 0 ]]; then
+ echo "INFO: There are images to protect defined in jenkins-config."
+else
+ echo "ERROR: No images detected in the jenkins-config dir."
+ exit 1
+fi
+
+if ! [[ ${#jjbimages[@]} -eq 0 ]]; then
+ echo "INFO: There are additional images to protect in the jjb dir."
+ images=("${images[@]}" "${jjbimages[@]}")
+ #dedupe
+ readarray -t images < <(printf '%s\n' "${images[@]}" | sort -u)
+fi
+
+
+echo "INFO: Protecting the following images:"
+for image in "${images[@]}"; do
+ echo "$image"
+done