Last active
January 22, 2018 14:39
-
-
Save gmaliar/8bed8eab4e32053250009ed2d253d9da to your computer and use it in GitHub Desktop.
Helm example: deploy script
This file contains hidden or 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
| #!/bin/sh | |
| STAGE=production | |
| VERSION=$(git rev-parse --short=6 HEAD) | |
| TAG=tailor-web:v${VERSION} | |
| # Build Docker Image | |
| docker build -t $TAG -f Dockerfile | |
| # Push Docker Image to ECR | |
| docker push $TAG $ECR_REPO/$TAG | |
| helm upgrade tailor charts/tailor \ # helm upgrade <chart name> <chart file locations> | |
| --timeout 600 \ # Increase our deploy timeout to allow Helm enough time to run migrations without dying | |
| -i \ # Install or upgrade the chart | |
| -f charts/tailor/values.yaml \ # General values file | |
| -f charts/tailor/${STAGE}.yaml \ # Environment specific values file | |
| --set release.version=${VERSION} # Release version based on Git commit hash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment