Skip to content

Instantly share code, notes, and snippets.

@lucj

lucj/gitlab-ci.yaml

Last active Oct 16, 2019
Embed
What would you like to do?
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