From 0ac33054a7c8b5e7b18ce9927e6c007553cf716c Mon Sep 17 00:00:00 2001 From: Michael Kriese Date: Tue, 21 Mar 2023 14:19:15 +0100 Subject: [PATCH] ci: add chart testing --- .woodpecker/e2e.yml | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .woodpecker/e2e.yml diff --git a/.woodpecker/e2e.yml b/.woodpecker/e2e.yml new file mode 100644 index 0000000..beba4c4 --- /dev/null +++ b/.woodpecker/e2e.yml @@ -0,0 +1,44 @@ +platform: linux/amd64 + +when: + event: + - pull_request + - push + branch: + - main + - release/** + +matrix: + k8s: + # from https://hub.docker.com/r/kindest/node/tags + - v1.25.3 # renovate: kindest + - v1.26.2 # renovate: kindest + +pipeline: + create-cluster: + image: alpine:3.17.2 + pull: true + commands: + - apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing kind + - export KUBECONFIG=$${CI_WORKSPACE}/kube.config + - kind create cluster --name chart-testing --node-image kindest/node:${k8s} --wait 60s + + chart-testing: + image: alpine:3.17.2 + pull: true + commands: + - apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing helm kubectl kind + - export KUBECONFIG=$${CI_WORKSPACE}/kube.config + - kubectl get no -o wide + + delete-cluster: + image: alpine:3.17.2 + pull: true + commands: + - apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing kind + - export KUBECONFIG=$${CI_WORKSPACE}/kube.config + - kind delete cluster--name chart-testing + when: + status: + - success + - failure