[build] Add Slack notifications for important iOS builds

- Notifies #apple when nightly builds fail.
- Notifies #apple when release deployment jobs start/finish.
This commit is contained in:
Jason Wray
2018-08-24 16:30:54 -04:00
committed by Jason Wray
parent 361d83af54
commit 4061e9026e
2 changed files with 52 additions and 0 deletions

12
scripts/notify-slack.sh Executable file
View File

@@ -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