Commit f756bbe2 authored by Pierre Smeyers's avatar Pierre Smeyers
Browse files

Merge branch '36-gitlab-k8s-agent-support' into 'master'

fix(KUBECONFIG): select  to the given KUBE_CONTEXT if provided

Closes #36

See merge request to-be-continuous/kubernetes!53
parents c28ad61a c31371c7
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -303,6 +303,12 @@ stages:
    elif [[ -n "$KUBECONFIG" ]]
    then
      log_info "--- using \\e[32mKUBECONFIG\\e[0m provided by GitLab"

      if [[ -n "$KUBE_CONTEXT" ]]
      then
        kubectl config use-context "$KUBE_CONTEXT"
        log_info "--- switch to the given \\e[32mKUBE_CONTEXT\\e[0m: ${KUBE_CONTEXT}"
      fi
    else
      log_info "--- using exploded \\e[32mKUBECONFIG\\e[0m parameters (env: \\e[33;1m${environment_type}\\e[0m, url: \\e[33;1m${url}\\e[0m, namespace: \\e[33;1m${namespace}\\e[0m)"