aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/deploy.sh
diff options
context:
space:
mode:
authorGravatar Leon Sandøy <[email protected]>2019-09-15 12:30:58 +0200
committerGravatar Leon Sandøy <[email protected]>2019-09-15 12:30:58 +0200
commitb3279e4251d9e7caa25e32db2bca170275c130ef (patch)
treecdb32ec5b3f954d1f180a9afffdcb3b75901cd25 /scripts/deploy.sh
parentTag Django images as `latest`. (diff)
The DockerHub deployment should now run on 'master'
Diffstat (limited to 'scripts/deploy.sh')
-rw-r--r--scripts/deploy.sh32
1 files changed, 0 insertions, 32 deletions
diff --git a/scripts/deploy.sh b/scripts/deploy.sh
deleted file mode 100644
index 070d0ec26..000000000
--- a/scripts/deploy.sh
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/bash
-
-# Build and deploy on master branch
-if [[ $CI_COMMIT_REF_SLUG == 'master' ]]; then
- echo "Connecting to docker hub"
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
-
- changed_lines=$(git diff HEAD~1 HEAD docker/base.Dockerfile | wc -l)
-
- if [ $changed_lines != '0' ]; then
- echo "base.Dockerfile was changed"
-
- echo "Building bot base"
- docker build -t pythondiscord/bot-base:latest -f docker/base.Dockerfile .
-
- echo "Pushing image to Docker Hub"
- docker push pythondiscord/bot-base:latest
- else
- echo "base.Dockerfile was not changed, not building"
- fi
-
- echo "Building image"
- docker build -t pythondiscord/bot:latest -f docker/bot.Dockerfile .
-
- echo "Pushing image"
- docker push pythondiscord/bot:latest
-
- echo "Deploying container"
- curl -H "token: $AUTODEPLOY_TOKEN" $AUTODEPLOY_WEBHOOK
-else
- echo "Skipping deploy"
-fi