Loading .gitlab-ci.yml +14 −0 Original line number Diff line number Diff line Loading @@ -82,3 +82,17 @@ test-ensure-namespace: - kubectl config use-context k3s - kubectl version - ensure_namespace test-initialize-tiller: stage: test image: "$BUILD_IMAGE_NAME" <<: *k3s-services variables: KUBE_NAMESPACE: default script: - source /build/deploy-helpers.sh - kubectl config set-cluster k3s --server https://node:some-secret@k3s:6443 --insecure-skip-tls-verify - kubectl config set-context k3s --cluster=k3s - kubectl config use-context k3s - kubectl version - initialize_tiller src/deploy-helpers.sh +16 −0 Original line number Diff line number Diff line #! /bin/sh export TILLER_NAMESPACE=$KUBE_NAMESPACE function check_kube_domain() { if [[ -z "$KUBE_INGRESS_BASE_DOMAIN" ]]; then echo "In order to deploy or use Review Apps," Loading Loading @@ -40,3 +42,17 @@ function download_chart() { function ensure_namespace() { kubectl get namespace "$KUBE_NAMESPACE" || kubectl create namespace "$KUBE_NAMESPACE" } function initialize_tiller() { echo "Checking Tiller..." export HELM_HOST="localhost:44134" tiller -listen ${HELM_HOST} -alsologtostderr > /dev/null 2>&1 & echo "Tiller is listening on ${HELM_HOST}" if ! helm version --debug; then echo "Failed to init Tiller." return 1 fi echo "" } Loading
.gitlab-ci.yml +14 −0 Original line number Diff line number Diff line Loading @@ -82,3 +82,17 @@ test-ensure-namespace: - kubectl config use-context k3s - kubectl version - ensure_namespace test-initialize-tiller: stage: test image: "$BUILD_IMAGE_NAME" <<: *k3s-services variables: KUBE_NAMESPACE: default script: - source /build/deploy-helpers.sh - kubectl config set-cluster k3s --server https://node:some-secret@k3s:6443 --insecure-skip-tls-verify - kubectl config set-context k3s --cluster=k3s - kubectl config use-context k3s - kubectl version - initialize_tiller
src/deploy-helpers.sh +16 −0 Original line number Diff line number Diff line #! /bin/sh export TILLER_NAMESPACE=$KUBE_NAMESPACE function check_kube_domain() { if [[ -z "$KUBE_INGRESS_BASE_DOMAIN" ]]; then echo "In order to deploy or use Review Apps," Loading Loading @@ -40,3 +42,17 @@ function download_chart() { function ensure_namespace() { kubectl get namespace "$KUBE_NAMESPACE" || kubectl create namespace "$KUBE_NAMESPACE" } function initialize_tiller() { echo "Checking Tiller..." export HELM_HOST="localhost:44134" tiller -listen ${HELM_HOST} -alsologtostderr > /dev/null 2>&1 & echo "Tiller is listening on ${HELM_HOST}" if ! helm version --debug; then echo "Failed to init Tiller." return 1 fi echo "" }