Skip to content

Instantly share code, notes, and snippets.

@lucj
Last active October 16, 2019 21:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save lucj/0f1239302be41504de5e7ee2350693fe to your computer and use it in GitHub Desktop.
Save lucj/0f1239302be41504de5e7ee2350693fe to your computer and use it in GitHub Desktop.
kube deployment
deploy-kube:
stage: deploy
environment: test
image: dtzar/helm-kubectl:2.12.3
script:
- kubectl config set-cluster sophia-cluster --server=${KUBE_URL} --certificate-authority="${KUBE_CA_PEM_FILE}"
- kubectl config set-credentials sophia-admin --token=${KUBE_TOKEN}
- kubectl config set-context sophia-context --cluster=sophia-cluster --user=sophia-admin --namespace ${KUBE_NAMESPACE}
- kubectl config use-context sophia-context
- helm upgrade --reuse-values --set image.tag=$CI_BUILD_REF sophia k8s-chart
only:
refs:
- master
kubernetes: active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment