Skip to content

Commit

Permalink
--wip--
Browse files Browse the repository at this point in the history
  • Loading branch information
brasseld committed Sep 28, 2021
1 parent 07ad2a0 commit c56e3da
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 0 deletions.
83 changes: 83 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
version: 2.1

jobs:
run_helm_tests:
docker:
- image: cimg/base:2021.04
resource_class: small
steps:
- checkout
- run:
name: Install Helm
command: |
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
helm version
- run:
name: Install Helm Unittest
command: |
helm plugin install https://github.com/quintush/helm-unittest
- run:
name: Run Helm Linter
command: |
helm lint apim/apim3
helm lint am
helm lint cockpit
helm lint ae
- run:
name: Run APIM unit tests
command: |
helm unittest -3 -f 'tests/**/*.yaml' apim/apim3
- run:
name: Run AM unit tests
command: |
helm unittest -3 -f 'tests/*.yaml' am
run_integration_tests:
docker:
- image: cimg/base:2021.04
resource_class: large
environment:
CLUSTER_NAME: chart-testing
NODE_K8S_VERSION: v1.20.2@sha256:8f7ea6e7642c0da54f04a7ee10431549c0257315b3a634f6ef2fecaaedb19bab
KIND_VERSION: v0.11.1
WAIT_FOR_CONTROLPLANE: 60s
steps:
- checkout
- setup_remote_docker
- run:
name: Install Helm
command: |
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
helm version
- run:
name: Install Kubectl
command: |
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
chmod +x ./kubectl
./kubectl version --client=true
- run:
name: Install Kind
command: |
curl -Lo ./kind https://kind.sigs.k8s.io/dl/${KIND_VERSION}/kind-linux-amd64
chmod +x ./kind
./kind --version
- run:
name: Create Kind Cluster
command: |
echo 'Delete existing cluster'
./kind delete cluster --name "$CLUSTER_NAME" > /dev/null 2>&1 || true
echo 'Create new Kind cluster'
./kind create cluster --name "$CLUSTER_NAME" --kubeconfig $HOME/$CLUSTER_NAME.kubeconfig --config tests/kind/kind-config.yaml --image "kindest/node:$NODE_K8S_VERSION" --wait $WAIT_FOR_CONTROLPLANE
cat $HOME/$CLUSTER_NAME.kubeconfig
./kubectl cluster-info --context kind-chart-testing --kubeconfig $HOME/$CLUSTER_NAME.kubeconfig
workflows:
build_branch:
jobs:
- run_helm_tests
- run_integration_tests
# - run_integration_tests:
# requires:
# - run_helm_tests
6 changes: 6 additions & 0 deletions tests/kind/kind-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
featureGates:
EphemeralContainers: true
nodes:
- role: control-plane

0 comments on commit c56e3da

Please sign in to comment.