Last active
August 31, 2019 10:57
-
-
Save ju5t/e8a8bf5dd241ba824fbcfcde5dc6dc82 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
variables: | |
K8S_NAMESPACE: $CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG | |
stages: | |
- deploy | |
deploy-k8s: | |
image: dtzar/helm-kubectl | |
stage: deploy | |
before_script: | |
- apk add -u gettext | |
- kubectl create secret docker-registry regcred --docker-server=$CI_REGISTRY --docker-username="$CI_DEPLOY_USER" --docker-password="$CI_DEPLOY_PASSWORD" --docker-email="$GITLAB_USER_EMAIL" --dry-run=true -o yaml | kubectl apply -f - | |
environment: | |
name: test | |
url: test.yourapp.com | |
script: | |
- VERSION="${CI_COMMIT_TAG:-none}" envsubst < k8s.yml | kubectl apply -f - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment