-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
89 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |