Skip to content

Commit 6827ba8

Browse files
committed
chore(crd-generate): wip
1 parent 5fd5283 commit 6827ba8

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
/manifests
1+
/manifests
2+
/models

tests/test-xfuncjs.sh

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ yarn --cwd tests/fixtures/domain-sdk compo
5454
echo "Applying XRD and Compositions..."
5555
kubectl apply -f tests/fixtures/domain-sdk/functions/xsimpleconfigmaps/xrd.yaml
5656
kubectl apply -f tests/fixtures/domain-sdk/manifests/xsimpleconfigmaps.compo.yaml
57-
# kubectl apply -f tests/fixtures/domain-sdk/manifests
5857

5958
# Wait for XRD to be established
6059
echo "Waiting for XRD to be established..."
@@ -65,6 +64,22 @@ kubectl wait --for=condition=established xrd/xsimpleconfigmaps.test.crossplane.i
6564
exit 1
6665
}
6766

67+
# Wait for the XSimpleConfigmap CRD to be established
68+
echo "Waiting for XSimpleConfigmap CRD to be established..."
69+
for i in {1..30}; do
70+
if kubectl get crd xsimpleconfigmaps.test.crossplane.io &> /dev/null; then
71+
echo "XSimpleConfigmap CRD is established!"
72+
break
73+
fi
74+
echo "Waiting for XSimpleConfigmap CRD to be established... ($i/30)"
75+
sleep 2
76+
done
77+
78+
# Generate models from CRD
79+
kubectl get crd xsimpleconfigmaps.test.crossplane.io -o yaml > tests/fixtures/domain-sdk/manifests/xsimpleconfigmaps.crd.yaml
80+
yarn crd-generate --input tests/fixtures/domain-sdk/manifests/xsimpleconfigmaps.crd.yaml --output tests/fixtures/domain-sdk/models
81+
82+
6883
# Create a test XSimpleConfigMap
6984
echo "(Re)Creating test XSimpleConfigMap..."
7085
kubectl delete -f tests/fixtures/domain-sdk/sample.yaml || true

0 commit comments

Comments
 (0)