Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
fix deploy script syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianjost committed Mar 5, 2020
1 parent 40cf03b commit 0f487f4
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions deploy/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@

inform_live() {
# $1: Project Name (client, storybook, vuepress)
if [[ "$TRAVIS_EVENT_TYPE" != "cron" ]]
then
curl -X POST -H 'Content-Type: application/json' --data '{"text":":rocket: Die Produktivsysteme können aktualisiert werden: Schul-Cloud editor! Dockertag: '$DOCKERTAG'"}' $WEBHOOK_URL_CHAT
fi
if [[ "$TRAVIS_EVENT_TYPE" != "cron" ]]
then
curl -X POST -H 'Content-Type: application/json' --data '{"text":":rocket: Die Produktivsysteme können aktualisiert werden: Schul-Cloud editor! Dockertag: '$DOCKERTAG'"}' $WEBHOOK_URL_CHAT
fi
}

inform_staging() {
if [[ "$TRAVIS_EVENT_TYPE" != "cron" ]]
then
curl -X POST -H 'Content-Type: application/json' --data '{"text":":boom: Das Staging-System wurde aktualisiert: Schul-Cloud editor! (Dockertag: '$DOCKERTAG')"}' $WEBHOOK_URL_CHAT
fi
if [[ "$TRAVIS_EVENT_TYPE" != "cron" ]]
then
curl -X POST -H 'Content-Type: application/json' --data '{"text":":boom: Das Staging-System wurde aktualisiert: Schul-Cloud editor! (Dockertag: '$DOCKERTAG')"}' $WEBHOOK_URL_CHAT
fi
}

deploy(){
Expand Down Expand Up @@ -72,15 +72,17 @@ case "$TRAVIS_BRANCH" in

master)
inform_live
;;
;;

develop)
echo "develop"
# deploy $SYSTEM $DOCKERFILE $DOCKERTAG $DOCKER_SERVICENAME $COMPOSE_DUMMY $COMPOSE_FILE $COMPOSE_SERVICENAME
deploy "test" "editor" $DOCKERTAG "test-schul-cloud_editor" "compose-editor_default.dummy" "editor.yml" "test-schul-cloud"
# deploy $SYSTEM $DOCKERFILE $DOCKERTAG $DOCKER_SERVICENAME $COMPOSE_DUMMY $COMPOSE_FILE $COMPOSE_SERVICENAME
deploy "test" "editor" $DOCKERTAG "test-schul-cloud_editor" "compose-editor_default.dummy" "editor.yml" "test-schul-cloud"
;;
release* | hotfix*)
echo "release/hotfix"
deploy "staging" "editor" $DOCKERTAG "staging_editor" "compose-editor_default.dummy" "editor_default.yml" "staging"
echo "release/hotfix"
deploy "staging" "editor" $DOCKERTAG "staging_editor" "compose-editor_default.dummy" "editor_default.yml" "staging"
;;
esac

exit 0

0 comments on commit 0f487f4

Please sign in to comment.