Skip to content

Instantly share code, notes, and snippets.

@shalkam
Created May 20, 2019 08:36
Show Gist options
  • Save shalkam/d15d532fc98187d7fae3237c7f76b418 to your computer and use it in GitHub Desktop.
Save shalkam/d15d532fc98187d7fae3237c7f76b418 to your computer and use it in GitHub Desktop.
using kubeconfig.yml
stages:
- deploy
variables:
KUBE_CONFIG: "content_of_base64_kubeconfig.yml_goes_here"
deploy_app:
image: bitnami/kubectl:latest
stage: deploy
environment: production
only:
- master
script:
- echo -n $KUBE_CONFIG | base64 -d > ./config
- kubectl set image deployment my-app web=${CI_REGISTRY}/user/repo/${CI_PROJECT_PATH_SLUG}:${CI_COMMIT_SHORT_SHA} --kubeconfig ./config --namespace default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment