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

Problem solving technique #1: Taking a mental break

Problem solving technique #1: Taking a mental break

  • February 4, 2011

Developers are modern day artists whose masterpieces are not hung on walls but stretched out thin on web servers all over the world, yes that is very poetic, but I really try to look at developers as artists and puzzle solvers. To become better developers your skill-set must include creativity and problem solving skills and of course a artistic touch.

Read More
ReviewMe: Ganhe dinheiro por sua opinião!

ReviewMe: Ganhe dinheiro por sua opinião!

  • November 17, 2006

Artigo patrocinado por: Review Me

Sim, eu falei patrocínio! Não, eu não virei popstar. A importância dos Blogs cresce a cada dia, e seu potencial como ferramenta de influencia é cada vez mais inegável. Visando aproveitar esta onda vimos surgir várias formas de anunciar nestes sites, como AdSense, Admarket dentre outros. O que é novo então?

Read More
dmsAutoComplete v1.1 - ChangeLog

dmsAutoComplete v1.1 - ChangeLog

  • October 2, 2006

Recently I published an updated version of my auto-complete (Google suggest) script compatible with IE and FireFox and based on PHP/AJAX.

After publishing version 1.0, I had some feedback from people who downloaded an tested it, so now I decided to correct some of the bugs that were found, and make a few improvements also. So now I’m going to publish version 1.1, check out some of the changes I made.

Read More