All Projects → DiscordHooks → gitlab-ci-discord-webhook

DiscordHooks / gitlab-ci-discord-webhook

Licence: MIT License
⛓ Here's your serverless solution for sending build status from GitLab CI to Discord as webhooks.

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to gitlab-ci-discord-webhook

appveyor-discord-webhook
⛓ Here's your serverless solution for sending build status from AppVeyor to Discord as webhooks.
Stars: ✭ 52 (+62.5%)
Mutual labels:  webhook, discord-webhooks, discord-webhook-notifications
gitlab-ci-android-fastlane
Docker image for building android apps on Gitlab CI
Stars: ✭ 25 (-21.87%)
Mutual labels:  gitlab, gitlab-ci
froggit-go
Froggit-Go is a universal Go library, allowing to perform actions on VCS providers.
Stars: ✭ 19 (-40.62%)
Mutual labels:  gitlab, webhook
godot-ci
Docker image to export Godot Engine games. Templates for Gitlab CI and GitHub Actions to deploy to GitLab Pages/GitHub Pages/Itch.io.
Stars: ✭ 316 (+887.5%)
Mutual labels:  gitlab, gitlab-ci
gitlab-ci-runner-marathon
A customized Docker image for running scalable GitLab CI runners on Marathon
Stars: ✭ 14 (-56.25%)
Mutual labels:  gitlab, gitlab-ci
epf-transmitter
astrizhachuk.github.io/epf-transmitter/
Stars: ✭ 32 (+0%)
Mutual labels:  gitlab, webhook
gitlab-chart
Kubernetes Helm chart to deploy GitLab
Stars: ✭ 59 (+84.38%)
Mutual labels:  gitlab, gitlab-ci
YappyGitLab
A GitLab monitor bot for Discord
Stars: ✭ 51 (+59.38%)
Mutual labels:  gitlab, webhook
pm2-githook
receive webhook from github/gitlab and ask pm2 to reload the application for you
Stars: ✭ 39 (+21.88%)
Mutual labels:  gitlab, webhook
rocketchat-gitlab-hook
Add GitLab notifications via a new WebHook in Rocket.Chat
Stars: ✭ 80 (+150%)
Mutual labels:  gitlab, webhook
better-discord-notifications
Scripts that send better sonarr/radarr notifications to discord
Stars: ✭ 13 (-59.37%)
Mutual labels:  notifications, webhook
gitlab-ci-variables-cli
CLI tool to allow setting bulk project variables on Gitlab CI
Stars: ✭ 38 (+18.75%)
Mutual labels:  gitlab, gitlab-ci
gitlabby-dockerish-laravel
What happens when you Dockerize your Laravel testing environment and throw it at Gitlab CI?
Stars: ✭ 33 (+3.13%)
Mutual labels:  gitlab, gitlab-ci
CTFtime-Discord-hooks
A script that will send the upcoming CTFs to given discord webhook
Stars: ✭ 18 (-43.75%)
Mutual labels:  webhook, discord-webhooks
GitLabCLI
Cross platform GitLab CLI tool
Stars: ✭ 28 (-12.5%)
Mutual labels:  gitlab, gitlab-ci
godot-cpp-ci
Docker image and Github Actions to automatically compile Godot C++ GDNative libraries.
Stars: ✭ 21 (-34.37%)
Mutual labels:  gitlab, gitlab-ci
gitlab-setup
A Packer / Terraform / Ansible configuration to install Gitlab and Gitlab-CI
Stars: ✭ 53 (+65.63%)
Mutual labels:  gitlab, gitlab-ci
gitlab-release-note-generator
A Gitlab release note generator
Stars: ✭ 88 (+175%)
Mutual labels:  gitlab, gitlab-ci
gitlab-runner
GitLab Runner (Docker image) for ARM devices, this is a mirror repository of
Stars: ✭ 17 (-46.87%)
Mutual labels:  gitlab, gitlab-ci
gitlab-job-log-viewer
Browser extension for code highlighting raw logs in Gitlab CI
Stars: ✭ 21 (-34.37%)
Mutual labels:  gitlab, gitlab-ci

GitLab CI 🡒 Discord Webhook

Backers on Open Collective Sponsors on Open Collective

If you are looking for a way to get build (success/fail) status reports from GitLab CI in Discord, stop looking. You've came to the right place.

Requirements

  • You should be using GitLab CI.
  • A Discord Server where notifications will be posted.
  • 5 minutes
  • A cup of coffee

Guide

  1. Create a webhook in your Discord Server (Guide).

  2. Copy the Webhook URL.

  3. Go to your repository CI/CD settings (for which you want status notifications) in GitLab and add an environment variable called WEBHOOK_URL and paste the Webhook URL you got in the previous step. You can also specify multiple webhook addresses at once, separating each with a whitespace character, such as space.

    Add environment variable in GitLab See: https://docs.gitlab.com/ee/ci/variables/#via-the-ui

  4. Add these lines, in their appropriate locations, to the .gitlab-ci.yml file of your repository.

    stages:
      - notification
    success_notification:
      stage: notification
      script:
        - wget https://raw.githubusercontent.com/DiscordHooks/gitlab-ci-discord-webhook/master/send.sh
        - chmod +x send.sh
        - ./send.sh success $WEBHOOK_URL
      when: on_success
    failure_notification:
      stage: notification
      script:
        - wget https://raw.githubusercontent.com/DiscordHooks/gitlab-ci-discord-webhook/master/send.sh
        - chmod +x send.sh
        - ./send.sh failure $WEBHOOK_URL
      when: on_failure
  5. Grab your coffee and enjoy! And, if you liked this, please Star this repository to show your love.

Artifacts

If you'd like to also link the artifacts in the CI Message, set the variable LINK_ARTIFACT to true:

variables:
  LINK_ARTIFACT: true

Make sure that the artifacts are available to download in the success_notification job. If they are produced by a previous one, you can follow this StackOverflow question

Please also note that artifacts are only available, if success_notification has been triggered.

Note

  • If you face any issues in the scripts (and you're sure it's not on your side), please consider opening an issue and I'll fix it ASAP.
  • If you want to improve the scripts, feel free to open a pull request.
  • If you are using an alpine image, you need to add git and curl packages before running this script.
    # ...
      script:
        - apk add --update git curl
    # ...

See Also

Contributors

This project exists thanks to all the people who contribute.

Backers

Thank you to all our backers! 🙏 [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].