Skip to content

Instantly share code, notes, and snippets.

@tristanlins
Last active January 19, 2020 13:32
Show Gist options
  • Save tristanlins/1d3ddd1099620b49aca05e3b70edaa71 to your computer and use it in GitHub Desktop.
Save tristanlins/1d3ddd1099620b49aca05e3b70edaa71 to your computer and use it in GitHub Desktop.
Medium | gitlab ci deploy
deploy:
image:
name: bitnami/kubectl:latest
entrypoint: [""]
stage: deploy
dependencies: []
script:
# Update the deployment
- kubectl patch deployment my-app -p '{"spec":{"template":{"metadata":{"labels":{"commitRef":"'sha-$CI_COMMIT_SHORT_SHA'"}}}}}'
# If you want to wait for the rollout
- kubectl rollout status deployment my-app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment