diff options
author | 2018-11-18 00:34:44 +0100 | |
---|---|---|
committer | 2018-11-18 00:34:44 +0100 | |
commit | f4c659b5260c9d17b69104047d25adeef1840ca4 (patch) | |
tree | 9744f22b5674ae7eb9360006a140740d95588a2f /scripts | |
parent | Update README.md (diff) |
Azure Pipeline CI
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/deploy-azure.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/deploy-azure.sh b/scripts/deploy-azure.sh new file mode 100755 index 00000000..c11b6afa --- /dev/null +++ b/scripts/deploy-azure.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +cd .. + +# 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/seasonalbot:latest -f docker/Dockerfile . + + echo "Pushing image to Docker Hub" + docker push pythondiscord/seasonalbot:latest + + echo "Deploying on server" + pepper $1 state.apply docker/hacktoberbot --out=no_out --non-interactive &> /dev/null +else + echo "Skipping deploy" +fi |