github.com/giantswarm/apiextensions/v6@v6.6.0/.circleci/config.yml (about) 1 version: 2.1 2 3 orbs: 4 architect: giantswarm/architect@4.6.0 5 6 jobs: 7 test-install: 8 machine: 9 image: ubuntu-2004:202010-01 10 environment: 11 KIND_VERSION: v0.11.1 12 KUBERNETES_VERSION: v1.21.2 13 steps: 14 - checkout 15 - run: 16 name: Download kind 17 command: | 18 curl -sLo kind https://github.com/kubernetes-sigs/kind/releases/download/$KIND_VERSION/kind-linux-amd64 19 - run: 20 name: Download kubectl 21 command: | 22 curl -sLO https://storage.googleapis.com/kubernetes-release/release/$KUBERNETES_VERSION/bin/linux/amd64/kubectl && chmod +x kind kubectl 23 - run: 24 name: Create cluster 25 command: | 26 ./kind create cluster --image quay.io/giantswarm/kind-node:$KUBERNETES_VERSION --name apiextensions 27 - run: 28 name: Wait for the cluster node to be ready 29 command: | 30 ./kubectl wait nodes/apiextensions-control-plane --for=condition=ready --timeout=5m > /dev/null 31 - run: 32 name: Install CRDs 33 command: | 34 ./kubectl create -f config/crd > /dev/null 35 - run: 36 name: Check for NonStructuralSchema condition indicating invalid CRDs 37 command: | 38 invalid=$(./kubectl wait crds --for condition=nonstructuralschema --timeout 0 --all 2> /dev/null | grep "condition met" | cut -d " " -f 1 | cut -d "/" -f 2 || true) 39 if [ ! -z "$invalid" ]; then 40 echo "NonStructuralSchema condition detected in the following CRDs:" 41 echo "$invalid" 42 exit 1 43 fi 44 - run: 45 name: Install CRs 46 command: | 47 for filename in docs/cr/*.yaml; do 48 if [[ "$filename" =~ .*"giantswarm".* ]]; then 49 ./kubectl apply -f "$filename" 50 fi 51 done 52 53 workflows: 54 workflow: 55 jobs: 56 - test-install 57 58 - architect/go-test: 59 name: go-test 60 filters: 61 # Trigger job also on git tag. 62 tags: 63 only: /^v.*/