debug
Some checks failed
Schemas / Schemas (push) Failing after 54s

This commit is contained in:
Joseph Hanson 2024-05-29 14:19:46 -05:00
parent e7c8560908
commit 6c81e20190
Signed by: jahanson
SSH key fingerprint: SHA256:vy6dKBECV522aPAwklFM3ReKAVB086rT3oWwiuiFG7o

View file

@ -76,6 +76,7 @@ jobs:
# Array creation failed, signal to skip organization by group
ORGANIZE_BY_GROUP=false
fi
# Extract CRDs from cluster
NUM_OF_CRDS=0
while read -r crd
@ -89,15 +90,15 @@ jobs:
# Save name and group for later directory organization
CRD_GROUPS["$resourceKind"]="$resourceGroup"
echo CRD_GROUPS: ${CRD_GROUPS[@]}
let ++NUM_OF_CRDS
done < <(kubectl get crds 2>&1 | sed -n '/NAME/,$p' | tail -n +2)
echo numCRDs: $NUM_OF_CRDS
cd $SCHEMAS_DIR
# Download converter script
curl https://raw.githubusercontent.com/yannh/kubeconform/master/scripts/openapi2jsonschema.py --output $TMP_CRD_DIR/openapi2jsonschema.py 2>/dev/null
cd $SCHEMAS_DIR
# Convert crds to jsonSchema
python3 $TMP_CRD_DIR/openapi2jsonschema.py $TMP_CRD_DIR/*.yaml
conversionResult=$?
@ -115,6 +116,7 @@ jobs:
crdFileName=$(basename $schema .json)
crdKind=${crdFileName%%_*}
crdGroup=${CRD_GROUPS[$crdKind]}
echo making directory $crdGroup
mkdir -p $crdGroup
mv $schema ./$crdGroup
done