I’d seen the name Travis a number of times in relation to Continous Integration, but never having any non-work repositories I’d never paid any attention to anything other than Jenkins.
But since starting on more private projects I did come to miss not having a ‘it works on my machine’ check. I didn’t really have an appetite to setup Jenkins locally, although it might not be much hassle with Docker and compose, it just wasn’t something I wanted to spend time on.
This is where Travis-ci.org comes into the picture. Firstly it is completely hosted; secondly, it’s completely free. (Enterprise packages available on travis-ci.com)
The org site is specifically set up to ease integration with your own Github repositories. Once you’ve signed in with the SSO/SAML magic you’re given a list of your private repos and simple tick boxes for which you want to enable.
From there is a tiny domain-specific language file you need to insert into the root of your repo. I’ve included the simplest Java one I could get away with as an example below.
language: java jdk: - oraclejdk8 sudo: false script: mvn clean verify
The build will then trigger whenever you push to the repo. Each build produces a summary plus the raw build process output.