Import from scala/jenkins-scripts
Towards Travis-style CI.