aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorGravatar Gareth Coles <[email protected]>2018-11-16 12:28:59 +0000
committerGravatar Gareth Coles <[email protected]>2018-11-16 12:28:59 +0000
commit433871f52e5af50234b65ba35d198f907ef5565f (patch)
tree28abdf83ddef247a661089794fcb6d988cbbc7fa /scripts
parentAzure: I hate bash. (diff)
Azure: Finish deployment; skip if PR
GitLab: Remove deployment step
Diffstat (limited to 'scripts')
-rw-r--r--scripts/deploy-azure.sh10
1 files changed, 6 insertions, 4 deletions
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