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