From f6f96c3aea82d9e6a9a27b4e8c8479afe58f3cee Mon Sep 17 00:00:00 2001 From: James Seibel Date: Mon, 28 Feb 2022 17:18:02 -0600 Subject: [PATCH] Test pipeline discord notifications --- .gitlab-ci.yml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b9ba21eb4..831fb3341 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,6 +6,7 @@ stages: - gradleSetup - build - merge + - sendDiscordNotification variables: # Disable the Gradle daemon for Continuous Integration servers as correctness @@ -106,8 +107,29 @@ merge: - Merged expire_in: 1 day +# forth stage +success_notification: + image: eclipse-temurin:17 + stage: sendDiscordNotification + script: + - apk add --update git curl + - wget https://raw.githubusercontent.com/DiscordHooks/gitlab-ci-discord-webhook/master/send.sh + - chmod +x send.sh + - /bin/ash ./send.sh success $WEBHOOK_URL + when: on_success -## forth stage +failure_notification: + image: eclipse-temurin:17 + stage: sendDiscordNotification + script: + - apk add --update git curl + - wget https://raw.githubusercontent.com/DiscordHooks/gitlab-ci-discord-webhook/master/send.sh + - chmod +x send.sh + - /bin/ash ./send.sh failure $WEBHOOK_URL + when: on_failure + + +## - stage #deploy: # stage: deploy # image: registry.gitlab.com/gitlab-org/release-cli:latest