Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/felixoi/hey-discord-the-pipeline-failed
Cloudflare Worker which can be used as a middleware between Gitlab webhooks and Discord webhooks to send out custom discord messages when your projects pipeline failed.
https://github.com/felixoi/hey-discord-the-pipeline-failed
cloudflare cloudflare-workers discord gitlab notifications workers
Last synced: 23 days ago
JSON representation
Cloudflare Worker which can be used as a middleware between Gitlab webhooks and Discord webhooks to send out custom discord messages when your projects pipeline failed.
- Host: GitHub
- URL: https://github.com/felixoi/hey-discord-the-pipeline-failed
- Owner: felixoi
- Created: 2022-07-01T17:04:55.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-07-01T17:40:05.000Z (over 2 years ago)
- Last Synced: 2024-11-09T09:36:14.508Z (3 months ago)
- Topics: cloudflare, cloudflare-workers, discord, gitlab, notifications, workers
- Language: TypeScript
- Homepage:
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Hey Discord, the pipeline failed!
Cloudflare Worker which can be used as a middleware between Gitlab webhooks and Discord webhooks to send out custom discord messages when your projects pipeline failed.
## Setup
1. Create a new Discord webhook in the desired notification channel and save the webhook
url as a new secret named `DISCORD_WEBHOOK`
2. Choose a secret which will allow Gitlab to access to the worker and save it
as a new secret named `GITLAB_WEBHOOK_SECRET_TOKEN`
3. Create a new KV store and change the `wrangler.toml` accordingly.
4. Create new KV pairs to configure the notifications (see configuration)
5. Create a new Gitlab webhook in the desired repository.
1. URL: the deployment url of this worker
2. Secret token: the chosen secret
3. Trigger: disable all but `Pipeline events`
4. SSL verification: true## Configuration
The configuration takes advantage of Cloudflare's key value store
as each key in the configured kv store represents the notification configuration
for one specific repository.key: `repository web url`
value: `{"branch_name": "notification text", ...}`for example:
key: `https://gitlab.com/example-group/example-project`
value: `{"main": "<@&979396042485276733> Die Pipeline der Webseite für den main-Branch ist fehlgeschlagen!", ...}`