Mimicking TravisCI with Jenkins

We are all awaiting the day when all of us can get TravisCI Pro and get all of that testing goodness into our private repositories right? And by that I mean, having our PRs annotated with build status, running automated tests and such.

Well, there is a work around to it, if you use Jenkins as your CI server. We have now set this up on our private repositories and it works like a charm!

Setting up Jenkins to annotate PRs

Considering you already have a setup of Jenkins that works with GitHub repositories but does builds based on watching master, this is what you need to get going with annotating PRs:

  1. Upgrade Jenkins to v1.500+
  2. Install the GitHub pull request builder plugin
  3. Follow the setup steps detailed on that page.
    • Admins and whitelist users should be placed one per line.
    • In global settings: you can leave Access Token blank
    • Your “bot” user must have pull/push permissions
  4. Sit back and watch PR annotation goodness
  5. I do recommend that you make this a simple build: unit tests and coding standard checks only, you want this to be quick, so I also turn off code coverage analysis.

This is what shows up on our PRs:

Build Status by Jenkins

You can also use comments to trigger re-builds, or allow builds on non-whitelist uses.

comments powered by Disqus

Related Posts

Using the Facebook PHP-SDK to run FQL

Using the Facebook PHP-SDK to run FQL

  • January 12, 2011

As of Facebook’s migration to the new Graph API and its OAuth 2.0 protocols, I can say that their Developer documentation has become a confusing, misleading and generally unstrung pile of semi-deprecated articles, and I’m being optimistic in doing so. Problem is lots of old articles are still in there pointing to old practices and recommendations and most of these do not come with disclaimers pointing to new recommendations, and in some extremes old soon-to-be-deprecated methods do not even have equivalents in the new APIs.

Read More
New Mac Widget: QR Code Generator

New Mac Widget: QR Code Generator

  • May 20, 2008

blog.rafaeldohms.com.br em QRWith the advent of the smartphones, tools used before in the most random areas end up coming to a phone near you. QR codes are one of these examples. The QR (or Quick response) codes are a matrix, a barcode in 2D, initially created for tracking packages and car parts. However they rapidly infiltrated various other areas, like our phones.

Read More
WP Widget: BlogBlogs.com.br Favorites

WP Widget: BlogBlogs.com.br Favorites

  • September 2, 2006

After BlogBlogs released its public API, it became possible to develop plug-ins that used their data to display different information on our blogs. Using this widget its possible to retrieve you favorite blogs list, and keep it synchronized always.

Read More