An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

          

# jenkins_consecutive_fail_detector

[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fbootjp%2Fjenkins_consecutive_fail_detector.svg?type=shield)](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
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fbootjp%2Fjenkins_consecutive_fail_detector.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fbootjp%2Fjenkins_consecutive_fail_detector?ref=badge_large)