include-system-upgrade-in-kubeconform-validation #203

Closed
aggarwalakshun wants to merge 12 commits from include-system-upgrade-in-kubeconform-validation into main
Showing only changes of commit 1366c0780a - Show all commits

View File

@@ -63,9 +63,9 @@ jobs:
for file in ${ALL_CHANGED_FILES}; do
[ -z "$file" ] && continue
echo "=== Validating: $file ==="
DOC_COUNT=$(yq eval 'length' <(yq eval-all '.' "$file"))
for i in $(seq 0 $((DOC_COUNT - 1))); do
KIND=$(yq eval ".[$i].kind // \"\"" <(yq eval-all '.' "$file"))
DOCS=$(yq eval-all '...' "$file" | wc -l)
for i in $(seq 0 $((DOCS - 1))); do
KIND=$(yq eval-all ".[$i].kind // \"\"" "$file")
if [[ -n "$KIND" && -n "${SCHEMA_MAP[$KIND]}" ]]; then
echo "Found $KIND in document $i - using custom schema"
SCHEMA_URL="https://raw.githubusercontent.com/datreeio/CRDs-catalog/refs/heads/main/${SCHEMA_MAP[$KIND]}"