Skip to content

LesterTheTester/judy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

judy

Judgemental Build-Reading Bot with Github and Slack Integration by LesterTheTester

Are you tired of reading build logs only to find out they failed for common, easily observable reasons? Are your teammates tired of you endlessly reminding them that their CI builds failed for inane reasons such as coding style checks, unittests, or dependencies that they could have easily tested before checkin?

Enter JudyTheJudgementalChicken. She clucks so you don't have to!

Setup:

  1. Install Judy

    $ sudo pip install judy-bot

  2. Run

    $ judy -f RULES -t GITHUB_OAUTH_TOKEN -r AUTHOR/REPO -i ISSUE_NUMBER -s SLACK_WEBHOOK_URL BUILD.log

where...

RULES is a JSON file (defaults to judy.json) containing key-value pairs of failure strings to search for, and HTML messages to post to Github / Slack: i.e.

{
  "BUILD FAILED":"YOUR BUILD CRASHED!! <img src='http://s3.amazonaws.com/content-test/crash.jpg'>"
}

GITHUB_OAUTH_TOKEN is the Github OAUTH token for a user that can post comments to your project

AUTHOR/REPO is your Github repo, i.e. LesterTheTester/judy

ISSUE_NUMBER is the issue or pull request number to comment on, i.e. 1

SLACK_WEBHOOK_URL is the URL given by Slack for your Incoming Webhook Integration

BUILD.log is the build output to search through

Github and/or Slack may be used, but at least one is required, otherwise Judy will complain and just print to stdout

Environment variables:

Instead of specifying these on the commandline, you may set the environment variables:

Github Integration

GITHUB_OAUTH_TOKEN

GITHUB_REPO

GITHUB_ISSUE

Slack Integration

SLACK_WEBHOOK_URL

Continous Integration Support

Judy is easily integrated into most CI systems, take Travis-CI for example:

...in your .travis.yml, require judy and execute:

before_script:
 - export JUDY_REPO=LesterTheTester/judy
 - export JUDY_ISSUE=$TRAVIS_PULL_REQUEST
 - sudo pip install judy-bot
script:
 - your_build_command | tee build.log
after_script:
 - judy build.log
env:
 - JUDY_OAUTH_TOKEN="travis-encrypt your oauth token below"
 - secure: "asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf"

Misc.

Consider physically embodying Judy with a Chicken puppet hat for your office:

http://www.amazon.com/Chicken-Hat-The-Clucker-Puppet/dp/B0040Z9ECG

Author makes no endorsement of this product nor receives any compensation for its sales.

About

Judgemental Build-Reading Bot with Github Integration

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages