Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Play framework 2.0 continuous integration setup

I am looking for ideas for a Play 2.0 continuous integration setup. It would contain typical jobs like build after a git push, nightly builds with deployment to a test Heroku instance etc. Also code quality and test coverage metrics generation would be handy.

At the moment the stack looks like Play 2.0 with Java but that might change to Scala.

For "traditional" Java web app I would use Hudson/Jenkins. I found a Hudson plugin for Play but it doesn't seem to support Play 2.0. Is Hudson suitable tool here in general or what is your setup for Play 2.0 applications?

like image 308
Petteri H Avatar asked May 01 '12 13:05

Petteri H


2 Answers

Play 2.0's build tool is just a thin wrapper around SBT. You should be able to use Hudson's sbt plugin to execute SBT build commands that are the equivalent of the Play commands you would execute from the console.

We execute the following under Bamboo for our builds:

SBT_OPTS="-Dsbt.log.noformat=true" sbt clean compile test 

(The SBT_OPTS variable turns off the colour formatting, making test output legible in log files.)

like image 123
Alex Varju Avatar answered Sep 29 '22 08:09

Alex Varju


I found useful to add JUnit reporting plugin as I couldn't get test results to be displayed otherwise.

https://github.com/bseibel/sbt-simple-junit-xml-reporter-plugin

For PMD and Checkstyle I used this: https://github.com/ymasory/sbt-code-quality.g8

For test coverage I am using JaCoCo at the moment: http://ronalleva.com/2012/04/25/jacoco-and-play.html

Scct could be other option for coverage: http://mtkopone.github.com/scct/

With those and PMD, CheckStyle and JaCoCo plugins for Jenkins I have now quite ok setup for a Play 2 Java project.

like image 22
Petteri H Avatar answered Sep 29 '22 09:09

Petteri H