https://github.com/bootjp/jenkins_consecutive_fail_detector
Modern systems and jobs are complex, and jobs can fail due to various system reasons. However, it's a bit noisy to get a failure notification every time a job can be retried. This tool ignores the job being retried and only notifies you when certain conditions are met.
https://github.com/bootjp/jenkins_consecutive_fail_detector
ci detector jenkins notification
Last synced: about 1 year ago
JSON representation
Modern systems and jobs are complex, and jobs can fail due to various system reasons. However, it's a bit noisy to get a failure notification every time a job can be retried. This tool ignores the job being retried and only notifies you when certain conditions are met.
- Host: GitHub
- URL: https://github.com/bootjp/jenkins_consecutive_fail_detector
- Owner: bootjp
- License: apache-2.0
- Created: 2021-01-05T05:38:12.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-03-10T03:52:56.000Z (over 1 year ago)
- Last Synced: 2025-03-10T04:33:18.506Z (over 1 year ago)
- Topics: ci, detector, jenkins, notification
- Language: Go
- Homepage: https://note.com/bootjp/n/n85298c8957b4
- Size: 7.09 MB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jenkins_consecutive_fail_detector
[](https://app.fossa.com/projects/git%2Bgithub.com%2Fbootjp%2Fjenkins_consecutive_fail_detector?ref=badge_shield)
Modern systems and jobs are complex, and jobs can fail due to various system reasons.
However, it's a bit noisy to get a failure notification every time a job can be retried.
This tool ignores the job being retried and only notifies you when certain conditions are met.
The conditions for notification are
- More than n consecutive errors occur in a specific job.
- There is no job running even if n hours have passed since the failed build of the specific job.
## How to use
### install with go get
```bash
go get github.com/bootjp/jenkins_consecutive_fail_detector
```
### install release binary (x86)
```bash
curl -LO https://github.com/bootjp/jenkins_consecutive_fail_detector/releases/latest/download/jenkins_consecutive_fail_detector-linux-amd64
chmod +x jenkins_consecutive_fail_detector-linux-amd64
```
### running check
```bash
JENKINS_USER="login_user" JENKINS_TOKEN="secret_token" jenkins_consecutive_fail_detector -url https://example.com:8080/jenkins
# or
JENKINS_USER="login_user" JENKINS_PASSWORD="login_password" jenkins_consecutive_fail_detector -url https://example.com:8080/jenkins
```
### Slack notification
- Add environment value `SLACK_WEBHOOK` are enable slack webhook.
- Add environment value `SLACK_USERNAME` modify notify slack username.
- Add environment value `SLACK_CHANNNEL` modify notify slack channel.
## License
[](https://app.fossa.com/projects/git%2Bgithub.com%2Fbootjp%2Fjenkins_consecutive_fail_detector?ref=badge_large)