summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-07 12:07:55 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-07 12:07:55 +0000
commit05f1d5d9813332bdd456cb358517e56168a24224 (patch)
treef9ed7a2692a537b5e1e541318f39d7464fdd8098 /scripts
parente440c86979e9c02a09fb6558f59a1fbe29433b51 (diff)
downloadgitlab-ce-05f1d5d9813332bdd456cb358517e56168a24224.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/notifications.sh27
1 files changed, 0 insertions, 27 deletions
diff --git a/scripts/notifications.sh b/scripts/notifications.sh
deleted file mode 100755
index d1b11d44e88..00000000000
--- a/scripts/notifications.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-# 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).
-function notify_slack() {
- 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
-}
-
-function notify_on_job_failure() {
- JOB_NAME=$1
- CHANNEL=$2
- MSG=$3
- ICON_EMOJI=$4
-
- local job_id
- job_id=$(scripts/get-job-id "$CI_PROJECT_ID" "$CI_PIPELINE_ID" "$JOB_NAME" -s failed)
- if [ -n "${job_id}" ]; then
- notify_slack "${CHANNEL}" "${MSG}" "${ICON_EMOJI}"
- fi
-}