Skip to content

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.

License

Notifications You must be signed in to change notification settings

bootjp/jenkins_consecutive_fail_detector

Repository files navigation

jenkins_consecutive_fail_detector

FOSSA Status

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

go get github.com/bootjp/jenkins_consecutive_fail_detector

install release binary (x86)

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

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

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages