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

Um estudo em RSS Parte 3: Publicando seu feed

Um estudo em RSS Parte 3: Publicando seu feed

  • September 7, 2006

Nos últimos posts aprendemos o que é um Feed RSS, como surgiu, qual é sua cara e como ler suas informações. Agora chegou a hora de juntar tudo isso e descobrir como criar um RSS do seu site, publicando as suas notícias para que todos possam conferir.

O cenário de testes que vou propor se tratará de um site simples de notícias, por exemplo, um site corporativo que deseja divugar as novidades sobre sua empresa ou ramo. Vamos detalhar a base de dados e mostrar de forma geral como transformar os dados da tabela em um feed RSS atualizado.

Read More
php|tek 2011 and what's trending

php|tek 2011 and what's trending

  • June 1, 2011

Another edition of php|tek has come and gone and this year some very amazing topics came into view.

Read More
Buscando Águias

Buscando Águias

  • August 21, 2006

Nesta Sexta-feira finalizei minha semana com um pouco de “iluminação”, participei de um Seminário extremamente interessante chamado “Buscando Águias” formulado por John Maxwell e apresentada por John Vereecken. Presidente da empresa Lidere a missão de Vereecken é promover a cultura de liderança na America latina, e é exatamente sobre este assunto que o seminário tratou. E seguindo a recomendação de John ao final da palestra, irei “espalhar o conhecimento e buscar águias”, por isso vou tenta relatar um pouco mais sobre como foi esta palestra.

Read More