aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorGravatar Akarys42 <[email protected]>2019-09-23 16:15:49 +0200
committerGravatar Akarys42 <[email protected]>2019-09-23 16:15:49 +0200
commit052fc4e36be6b0027ebbace530dbd9814660dc66 (patch)
tree250036c9d5162c6ee62d1a7bd6c999a03a2caad5 /scripts
parentChange log.error to log.exception (diff)
parentMake DEFCON days subcommand enable DEFCON (#405) (diff)
Merge branch 'master' of https://github.com/python-discord/bot into python-discord-master
Diffstat (limited to 'scripts')
-rw-r--r--scripts/deploy-azure.sh23
-rw-r--r--scripts/deploy.sh32
2 files changed, 2 insertions, 53 deletions
diff --git a/scripts/deploy-azure.sh b/scripts/deploy-azure.sh
index 6b3dea508..ed4b719e2 100644
--- a/scripts/deploy-azure.sh
+++ b/scripts/deploy-azure.sh
@@ -4,28 +4,9 @@ cd ..
# Build and deploy on master branch, only if not a pull request
if [[ ($BUILD_SOURCEBRANCHNAME == 'master') && ($SYSTEM_PULLREQUEST_PULLREQUESTID == '') ]]; then
- 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 .
+ docker build -t pythondiscord/bot:latest .
echo "Pushing image"
docker push pythondiscord/bot:latest
-
- echo "Deploying container"
- curl -H "token: $1" $2
-else
- echo "Skipping deploy"
-fi \ No newline at end of file
+fi
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