summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJason Wray <jason@mapbox.com>2018-08-24 16:30:54 -0400
committerJason Wray <friedbunny@users.noreply.github.com>2018-08-28 14:53:56 -0400
commit4061e9026e0a90c10f1f2cc77322e05ac8a45cf8 (patch)
tree20d3d72bd5519bc2ed3ca50b7376c6734764d64c /scripts
parent361d83af543ed3f2878d83f9fbc0990b938e7038 (diff)
downloadqtlocation-mapboxgl-4061e9026e0a90c10f1f2cc77322e05ac8a45cf8.tar.gz
[build] Add Slack notifications for important iOS builds
- Notifies #apple when nightly builds fail. - Notifies #apple when release deployment jobs start/finish.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/notify-slack.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/notify-slack.sh b/scripts/notify-slack.sh
new file mode 100755
index 0000000000..5b637e87af
--- /dev/null
+++ b/scripts/notify-slack.sh
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+
+set -e
+set -o pipefail
+set -u
+
+SLACK_CHANNEL=${SLACK_CHANNEL:-''}
+SLACK_COLOR=${SLACK_COLOR:-''}
+
+curl -g -H "Content-Type: application/json" -X POST \
+ -d "{\"channel\": \"$SLACK_CHANNEL\", \"attachments\": [{\"text\": \"$SLACK_MESSAGE\", \"color\": \"$SLACK_COLOR\", \"author_name\": \"$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME\"}]}" \
+ $SLACK_WEBHOOK_URL