1
0
mirror of https://github.com/gsi-upm/senpy synced 2024-11-22 00:02:28 +00:00

k8s deploy from raw KUBECONFIG

This commit is contained in:
J. Fernando Sánchez 2022-05-23 13:09:29 +02:00
parent 8489457370
commit 7ca5057705

View File

@ -101,12 +101,12 @@ latest-demo:
stage: deploy stage: deploy
environment: production environment: production
variables: variables:
KUBECONFIG_FILE: "/kubeconfig" KUBECONFIG: "/kubeconfig"
IMAGEWTAG: "${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA}" IMAGEWTAG: "${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA}"
KUBEAPP: "senpy" KUBEAPP: "senpy"
script: script:
- cat ${KUBECONFIG} > $KUBECONFIG_FILE - echo "${KUBECONFIG_RAW}" > $KUBECONFIG
- kubectl version - kubectl version
- cd k8s/ - cd k8s/
- cat *.yaml *.tmpl 2>/dev/null | envsubst | kubectl --kubeconfig $KUBECONFIG_FILE apply --namespace ${KUBENS:-default} -f - - cat *.yaml *.tmpl 2>/dev/null | envsubst | kubectl --kubeconfig $KUBECONFIG apply --namespace ${KUBENS:-default} -f -
- kubectl --kubeconfig $KUBECONFIG_FILE get all,ing -l app=${KUBEAPP} --namespace=${KUBENS:-default} - kubectl --kubeconfig $KUBECONFIG get all,ing -l app=${KUBEAPP} --namespace=${KUBENS:-default}