From 433871f52e5af50234b65ba35d198f907ef5565f Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Fri, 16 Nov 2018 12:28:59 +0000 Subject: Azure: Finish deployment; skip if PR GitLab: Remove deployment step --- scripts/deploy-azure.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'scripts/deploy-azure.sh') diff --git a/scripts/deploy-azure.sh b/scripts/deploy-azure.sh index 4df5cb0fc..659a297bf 100644 --- a/scripts/deploy-azure.sh +++ b/scripts/deploy-azure.sh @@ -1,7 +1,9 @@ #!/bin/bash -# Build and deploy on master branch -if [[ $BUILD_SOURCEBRANCHNAME == 'master' ]]; then +if [[ ]] + +# Build and deploy on master branch, only if not a pull request +if [[ $BUILD_SOURCEBRANCHNAME == 'master' ]] && [[ -z "${SYSTEM_PULLREQUEST_PULLREQUESTID}" ]]; then changed_lines=$(git diff HEAD~1 HEAD docker/base.Dockerfile | wc -l) if [ $changed_lines != '0' ]; then @@ -22,8 +24,8 @@ if [[ $BUILD_SOURCEBRANCHNAME == 'master' ]]; then echo "Pushing image" docker push pythondiscord/bot:latest - # echo "Deploying container" - # curl -H "token: $AUTODEPLOY_TOKEN" $AUTODEPLOY_WEBHOOK + echo "Deploying container" + curl -H "token: $AUTODEPLOY_TOKEN" $AUTODEPLOY_WEBHOOK else echo "Skipping deploy" fi \ No newline at end of file -- cgit v1.2.3