diff options
Diffstat (limited to 'scripts/notify-slack')
-rwxr-xr-x | scripts/notify-slack | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/scripts/notify-slack b/scripts/notify-slack deleted file mode 100755 index 5907fd8b986..00000000000 --- a/scripts/notify-slack +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -# Sends Slack notification MSG to CI_SLACK_WEBHOOK_URL (which needs to be set). -# ICON_EMOJI needs to be set to an icon emoji name (without the `:` around it). - -CHANNEL=$1 -MSG=$2 -ICON_EMOJI=$3 - -if [ -z "$CHANNEL" ] || [ -z "$CI_SLACK_WEBHOOK_URL" ] || [ -z "$MSG" ] || [ -z "$ICON_EMOJI" ]; then - echo "Missing argument(s) - Use: $0 channel message icon_emoji" - echo "and set CI_SLACK_WEBHOOK_URL environment variable." -else - curl -X POST --data-urlencode 'payload={"channel": "#'"$CHANNEL"'", "username": "GitLab QA Bot", "text": "'"$MSG"'", "icon_emoji": "'":$ICON_EMOJI:"'"}' "$CI_SLACK_WEBHOOK_URL" -fi |