Last active
December 22, 2017 16:24
-
-
Save Stono/22c92cc3c86574e9eab591a302249dfc to your computer and use it in GitHub Desktop.
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/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