Skip to content

Instantly share code, notes, and snippets.

@Stono
Last active December 22, 2017 16:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Stono/22c92cc3c86574e9eab591a302249dfc to your computer and use it in GitHub Desktop.
Save Stono/22c92cc3c86574e9eab591a302249dfc to your computer and use it in GitHub Desktop.
#!/bin/bash
if [ -z "$RELEASE_NAME" ]; then
echo "ERROR: Please set \$RELEASE_NAME"
exit 1
fi
if [ -z "$GO_PIPELINE_COUNTER" ]; then
echo "ERROR: Please set \$GO_PIPELINE_COUNTER"
exit 1
fi
APP="aws/helm-$RELEASE_NAME"
VERSION="0.1.$GO_PIPELINE_COUNTER"
echo "Deploying $APP"
if [ "$(helm list "($RELEASE_NAME)$" | wc -l | xargs)" = "2" ]; then
echo "App is already deployed, updating..."
echo helm upgrade $RELEASE_NAME $APP --debug --set platform-helm-at-service.app.version=0.1.$GO_PIPELINE_COUNTER
else
echo "App doesn't exist, installing..."
echo helm install $APP -n $RELEASE_NAME --debug --set platform-helm-at-service.app.version=0.1.$GO_PIPELINE_COUNTER
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment