kubeconform workflow will handle multiple manifests in a single file #204

Closed
aggarwalakshun wants to merge 5 commits from better-handle-multiple-manifests-in-same-file into main
Showing only changes of commit d0966b8d97 - Show all commits

View File

@@ -63,7 +63,7 @@ jobs:
while IFS= read -r file; do
[ -z "$file" ] && continue
echo "=== Validating: $file ==="
MANIFESTS=$(yq r $file --tojson | jq '.[]' | jq -c 'select(.kind != null)')
MANIFESTS=$(yq e '.[]' "$file" | jq -c 'select(.kind != null)')
for manifest in ${MANIFESTS}; do
KIND=$(echo $manifest | yq -r '.kind // ""')
@@ -76,7 +76,7 @@ jobs:
-schema-location "$SCHEMA_URL" \
-cache "$KUBECONFORM_CACHE_DIR" \
-output json \
"<(echo '$manifest')"; then
"$manifest"; then
EXIT_CODE=1
fi
else
@@ -85,7 +85,7 @@ jobs:
-schema-location default \
-cache "$KUBECONFORM_CACHE_DIR" \
-output json \
"<(echo '$manifest')"; then
"$manifest"; then
EXIT_CODE=1
fi
fi