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

A new beginning

A new beginning

  • April 16, 2008

I had never really understood the real reason to have a blog and write articles, until my good friend Leonardo França motivated me into creating this blog. Quickly I realized that because of the blog I begun once more to learn new stuff, mainly to be able to write new articles.

Read More
Programação, códigos e Paris Hilton

Programação, códigos e Paris Hilton

  • September 24, 2006

Passeando pelo Digg.com encontrei alguma pérolas sobre programação que vou compartilhar com vocês. Achei estranho quando vi os respectivos títulos, mas após ler os artigos verifiquei que o conteúdo era bem interessante e intrigante até, eu diria.

Read More
Semana de Updates na Comunidade PHP

Semana de Updates na Comunidade PHP

  • December 19, 2006

Os últimos dias tem apresentado uma grande movimentação na comunidade PHP, desde o core até os frameworks. A primeira atualização vista foi o lançamento do PHP 5.2.1 RC2 que, embora seja apenas um release candidate, já traz consigo o novo compilador para uso no sistema operacional Windows. Esta atualização promete uma melhora significativa no desempenho do PHP em plataformas da Microsoft.

Read More