[TMP] Move notification templates up

This commit is contained in:
Kamil Śliwak 2021-10-21 18:57:14 +02:00
parent c4f11a06e5
commit 833271f9bb

View File

@ -72,6 +72,34 @@ defaults:
name: docs pragma version check
command: ./scripts/docs_version_pragma_check.sh
# --------------------------------------------------------------------------
# Notification Templates
- gitter_notify_failure_unless_pr: &gitter_notify_failure_unless_pr
name: Gitter notify failure (if not running on a PR)
command: |
if [[ $CI_PULL_REQUEST == "" ]]
then
curl -X POST -i \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer $GITTER_API_TOKEN" "https://api.gitter.im/v1/rooms/$GITTER_NOTIFY_ROOM_ID/chatMessages" \
-d '{"text":" ❌ Nightly job **'$CIRCLE_JOB'** failed on **'$CIRCLE_BRANCH'**. Please see '$CIRCLE_BUILD_URL' for details."}'
fi
when: on_fail
- gitter_notify_success_unless_pr: &gitter_notify_success_unless_pr
name: Gitter notify success (if not running on a PR)
command: |
if [[ $CI_PULL_REQUEST == "" ]]
then
curl -X POST -i \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer $GITTER_API_TOKEN" "https://api.gitter.im/v1/rooms/$GITTER_NOTIFY_ROOM_ID/chatMessages" \
-d '{"text":" ✅ Nightly job **'$CIRCLE_JOB'** succeeded on **'$CIRCLE_BRANCH'**. Please see '$CIRCLE_BUILD_URL' for details."}'
fi
when: on_success
# --------------------------------------------------------------------------
# Artifacts Templates
@ -338,34 +366,6 @@ defaults:
requires:
- b_win_release
# --------------------------------------------------------------------------
# Notification Templates
- gitter_notify_failure_unless_pr: &gitter_notify_failure_unless_pr
name: Gitter notify failure (if not running on a PR)
command: |
if [[ $CI_PULL_REQUEST == "" ]]
then
curl -X POST -i \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer $GITTER_API_TOKEN" "https://api.gitter.im/v1/rooms/$GITTER_NOTIFY_ROOM_ID/chatMessages" \
-d '{"text":" ❌ Nightly job **'$CIRCLE_JOB'** failed on **'$CIRCLE_BRANCH'**. Please see '$CIRCLE_BUILD_URL' for details."}'
fi
when: on_fail
- gitter_notify_success_unless_pr: &gitter_notify_success_unless_pr
name: Gitter notify success (if not running on a PR)
command: |
if [[ $CI_PULL_REQUEST == "" ]]
then
curl -X POST -i \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer $GITTER_API_TOKEN" "https://api.gitter.im/v1/rooms/$GITTER_NOTIFY_ROOM_ID/chatMessages" \
-d '{"text":" ✅ Nightly job **'$CIRCLE_JOB'** succeeded on **'$CIRCLE_BRANCH'**. Please see '$CIRCLE_BUILD_URL' for details."}'
fi
when: on_success
# -----------------------------------------------------------------------------------------------
jobs: