Skip to content
Snippets Groups Projects

Test Helm chart in CI pipeline

+ 36
2
@@ -10,6 +10,7 @@ stages:
- test
- check
- deploy
- post-deploy
default:
tags:
@@ -20,9 +21,9 @@ default:
- exec-dind
# see https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#tls-enabled
# for image usage and settings for building with TLS and docker in docker
image: docker:19.03.1
image: docker:20.10.12
services:
- docker:19.03.1-dind
- docker:20.10.12-dind
variables:
DOCKER_TLS_CERTDIR: "/certs"
@@ -51,6 +52,39 @@ lint-helm:
entrypoint: [""]
script: helm lint helm/
test-helm:
stage: post-deploy
extends: .dind
needs:
- lint-helm
# - deploy-theodolite
variables:
KUBECTL: v1.21.3
before_script:
- apk add -U wget bash openssl
# install kubectl
- wget -q -O /usr/local/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/${KUBECTL}/bin/linux/amd64/kubectl
- chmod +x /usr/local/bin/kubectl
# install k3d
- wget -q -O - https://raw.githubusercontent.com/rancher/k3d/main/install.sh | bash
- wget -q -O - https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
- k3d help
- k3d version
#- k3d cluster create testgitlabci --agents 1 --wait -p "30000:30000@agent[0]"
- k3d cluster create testgitlabci --agents 1 --wait -p "30000:30000@agent:0" # k3d 5.0
# show cluster info
- kubectl cluster-info
- helm version
script:
# Display initial pods, etc.
- cd helm
- helm install theodolite . -f preconfigs/minimal.yaml --wait
- kubectl get nodes -o wide
- kubectl get pods --all-namespaces -o wide
- kubectl get services --all-namespaces -o wide
after_script:
- k3d cluster delete testgitlabci
# Theodolite Benchmarks
Loading