Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/puzza007/gitlab_pipeline_annoyer
Post to a Slack channel when a Gitlab MR pipeline fails, @ing both the MR author and the merger
https://github.com/puzza007/gitlab_pipeline_annoyer
gitlab rust slack-bot
Last synced: 2 months ago
JSON representation
Post to a Slack channel when a Gitlab MR pipeline fails, @ing both the MR author and the merger
- Host: GitHub
- URL: https://github.com/puzza007/gitlab_pipeline_annoyer
- Owner: puzza007
- License: mit
- Created: 2022-03-24T03:24:00.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-08-15T04:13:05.000Z (4 months ago)
- Last Synced: 2024-10-05T06:54:59.075Z (3 months ago)
- Topics: gitlab, rust, slack-bot
- Language: Rust
- Homepage:
- Size: 209 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Gitlab Pipeline Annoyer
## Purpose
Post to a Slack channel when a Gitlab MR pipeline fails, @ing both the
MR author and the merger.The message will look something like
```
Failed MR: helm chart update for contact
Author: @john.smith
Merged by: @john.smith
Failed jobs
- test_dex Failed
- test_dev Failed
- test_smoke_dev Failed
```## Configuration
Create a Slack [app](https://api.slack.com/apps/) and give it the following permissions
* chat:write
* chat:write.customize
* chat:write.public
* users.profile:read## Running
The environment variables required are
* `GITLAB_API_TOKEN`
* `GITLAB_API_HOSTNAME`
* `SLACK_API_TOKEN`
* `SLACK_CHANNEL````shell
docker-compose up -d
```## Testing
```shell
docker-compose up -d
curl -v -H 'Content-Type: application/json' -d @pipeline.json localhost:3000
```## TODO
At the moment it is assumed your users have the same usernames in both
Gitlab and Slack