Puppet Online Linter GitHub Hook
I launched the Puppet Online Linter last week as a beta. It didn’t do much that was useful initially: uploading files for parsing and lint and the same functionality via an API.
The longer term plan though was to extend these capabilities to be a more well rounded web service. I’ve just made the first of these additions, a GitHub Post-Receive hook. When a new commit is made to a repository with the hook enabled the Linter will download the new or modified files, parse and lint them and then send an email report of the results to the commit author’s email address. If you don’t wish to receive emails you can easily opt out from the service.
For those interested in the technology aspects it is a pretty simple stack:
- Sinatra for the front end and the API
- The awesome Twitter Bootstrap framework for presentation
- DataMapper with an Sqlite3 backend
- Resque and Redis to run jobs
- Tilt for email templating and Pony to send the emails
- God, New Relic, CloudKick and Exceptional doing monitoring and some reporting
- Integration with other services (Puppet Forge I am looking at you.
For the moment the code isn’t open sourced and it’s important to note this isn’t a Puppet Labs supported project.
Future plans:
- Display diffs or highlights showing exactly where the error occurred.
- Send the report to the committers email assuming it exists.
- Support Opt in as well as Opt out for emails.
- Allow support for linting private repositories.
Additional features are also welcomed. Feel free to email me or leave a comment on this post with ideas.