Skip to content

Instantly share code, notes, and snippets.

@gmaliar
Last active January 22, 2018 14:39
Show Gist options
  • Select an option

  • Save gmaliar/8bed8eab4e32053250009ed2d253d9da to your computer and use it in GitHub Desktop.

Select an option

Save gmaliar/8bed8eab4e32053250009ed2d253d9da to your computer and use it in GitHub Desktop.
Helm example: deploy script
#!/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