From 33f04eb28b720e69ad9def01961ffca8e55393fb Mon Sep 17 00:00:00 2001 From: Johannes Christ Date: Sun, 15 Sep 2019 11:26:18 +0200 Subject: Tag Django images as `latest`. --- scripts/deploy-azure.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/deploy-azure.sh') diff --git a/scripts/deploy-azure.sh b/scripts/deploy-azure.sh index af69ab46b..9ffe01ab8 100644 --- a/scripts/deploy-azure.sh +++ b/scripts/deploy-azure.sh @@ -5,8 +5,8 @@ cd .. # Build and deploy on django branch, only if not a pull request if [[ ($BUILD_SOURCEBRANCHNAME == 'django') && ($SYSTEM_PULLREQUEST_PULLREQUESTID == '') ]]; then echo "Building image" - docker build -t pythondiscord/bot:django . + docker build -t pythondiscord/bot:latest . echo "Pushing image" - docker push pythondiscord/bot:django + docker push pythondiscord/bot:latest fi -- cgit v1.2.3 From b3279e4251d9e7caa25e32db2bca170275c130ef Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Sun, 15 Sep 2019 12:30:58 +0200 Subject: The DockerHub deployment should now run on 'master' --- scripts/deploy-azure.sh | 4 ++-- scripts/deploy.sh | 32 -------------------------------- 2 files changed, 2 insertions(+), 34 deletions(-) delete mode 100644 scripts/deploy.sh (limited to 'scripts/deploy-azure.sh') diff --git a/scripts/deploy-azure.sh b/scripts/deploy-azure.sh index 9ffe01ab8..ed4b719e2 100644 --- a/scripts/deploy-azure.sh +++ b/scripts/deploy-azure.sh @@ -2,8 +2,8 @@ cd .. -# Build and deploy on django branch, only if not a pull request -if [[ ($BUILD_SOURCEBRANCHNAME == 'django') && ($SYSTEM_PULLREQUEST_PULLREQUESTID == '') ]]; then +# Build and deploy on master branch, only if not a pull request +if [[ ($BUILD_SOURCEBRANCHNAME == 'master') && ($SYSTEM_PULLREQUEST_PULLREQUESTID == '') ]]; then echo "Building image" docker build -t pythondiscord/bot:latest . 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 -- cgit v1.2.3