Last active
January 19, 2020 13:32
-
-
Save tristanlins/1d3ddd1099620b49aca05e3b70edaa71 to your computer and use it in GitHub Desktop.
Medium | gitlab ci deploy
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
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