aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml10
-rw-r--r--azure-pipelines.yml4
-rw-r--r--scripts/deploy-azure.sh10
3 files changed, 8 insertions, 16 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f7aee8165..44126ded9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -26,13 +26,3 @@ test:
- python -m flake8
- ls /root/.cache/
-build:
- tags:
- - docker
-
- services:
- - docker:dind
-
- stage: build
- script:
- - sh scripts/deploy.sh
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index bce6dbce4..534742f4f 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -9,7 +9,7 @@ variables:
jobs:
- job: test
- displayName: 'Lint and test'
+ displayName: 'Lint & Test'
pool:
vmImage: 'Ubuntu 16.04'
@@ -38,7 +38,7 @@ jobs:
displayName: 'Run linter'
- job: build
- displayName: 'Build containers'
+ displayName: 'Build Containers'
dependsOn: 'test'
steps:
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