github.com/giantswarm/apiextensions/v2@v2.6.2/.circleci/config.yml (about)

     1  version: 2.1
     2  
     3  orbs:
     4    architect: giantswarm/architect@0.10.0
     5  
     6  jobs:
     7    validate:
     8      docker:
     9        - image: quay.io/giantswarm/architect
    10      steps:
    11        - checkout
    12        - run:
    13            name: Install make
    14            command: apk add --no-cache make
    15        - run:
    16            name: Ensure unchanged
    17            command: CGO_ENABLED=0 make verify
    18    test-install:
    19      machine: true
    20      environment:
    21        KIND_VERSION: v0.7.0
    22        KUBERNETES_VERSION: v1.16.4
    23      steps:
    24        - checkout
    25        - run:
    26            name: Download kind
    27            command: |
    28              curl -sLo kind https://github.com/kubernetes-sigs/kind/releases/download/$KIND_VERSION/kind-linux-amd64
    29        - run:
    30            name: Download kubectl
    31            command: |
    32              curl -sLO https://storage.googleapis.com/kubernetes-release/release/$KUBERNETES_VERSION/bin/linux/amd64/kubectl && chmod +x kind kubectl
    33        - run:
    34            name: Create cluster
    35            command: |
    36              ./kind create cluster --image quay.io/giantswarm/kind-node:$KUBERNETES_VERSION --name apiextensions 2> /dev/null
    37        - run:
    38            name: Wait for the cluster node to be ready
    39            command: |
    40              ./kubectl wait nodes/apiextensions-control-plane --for=condition=ready --timeout=5m > /dev/null
    41        - run:
    42            name: Install CRDs
    43            command: |
    44              ./kubectl create -f config/crd/v1 > /dev/null
    45        - run:
    46            name: Check for NonStructuralSchema condition indicating invalid CRDs
    47            command: |
    48              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)
    49              if [ ! -z "$invalid" ]; then
    50                echo "NonStructuralSchema condition detected in the following CRDs:"
    51                echo "$invalid"
    52                exit 1
    53              fi
    54        - run:
    55            name: Install CRs
    56            command: |
    57              for filename in docs/cr/*.yaml; do
    58                if [[ "$filename" =~ .*"giantswarm".* ]]; then
    59                  ./kubectl apply -f "$filename"
    60                fi
    61              done
    62  
    63  workflows:
    64    workflow:
    65      jobs:
    66        - validate
    67        - test-install
    68  
    69        - architect/go-test:
    70            name: go-test
    71            filters:
    72              # Trigger job also on git tag.
    73              tags:
    74                only: /^v.*/
    75  
    76        - architect/go-architect-legacy:
    77            name: go-build
    78            command: build
    79            requires:
    80              - go-test
    81              - validate
    82              - test-install
    83  
    84        - architect/go-architect-legacy:
    85            name: go-deploy
    86            command: deploy
    87            requires:
    88              - go-build
    89            filters:
    90              branches:
    91                only: master