From 7ca5057705ceb909a32748a73eddc126ed9431e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=2E=20Fernando=20S=C3=A1nchez?= Date: Mon, 23 May 2022 13:09:29 +0200 Subject: [PATCH] k8s deploy from raw KUBECONFIG --- .gitlab-ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3d70d07..f634192 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -101,12 +101,12 @@ latest-demo: stage: deploy environment: production variables: - KUBECONFIG_FILE: "/kubeconfig" + KUBECONFIG: "/kubeconfig" IMAGEWTAG: "${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA}" KUBEAPP: "senpy" script: - - cat ${KUBECONFIG} > $KUBECONFIG_FILE + - echo "${KUBECONFIG_RAW}" > $KUBECONFIG - kubectl version - cd k8s/ - - cat *.yaml *.tmpl 2>/dev/null | envsubst | kubectl --kubeconfig $KUBECONFIG_FILE apply --namespace ${KUBENS:-default} -f - - - kubectl --kubeconfig $KUBECONFIG_FILE get all,ing -l app=${KUBEAPP} --namespace=${KUBENS:-default} + - cat *.yaml *.tmpl 2>/dev/null | envsubst | kubectl --kubeconfig $KUBECONFIG apply --namespace ${KUBENS:-default} -f - + - kubectl --kubeconfig $KUBECONFIG get all,ing -l app=${KUBEAPP} --namespace=${KUBENS:-default}