Skip to content

Jenkins and Play!

peterszatmary edited this page Feb 26, 2016 · 13 revisions

Jenkins and Play!

Jenkins can be used with Play! in two ways :

  • with SBT plugin
  • with Play! plugin

This post will cover first possibility with SBT plugin.

Credencials

  • Jenkins : download and install it.

On my computer (Linux) :

sudo apt-get install jenkins
  • Jenkins : run it.

Jenkins is just war package so you can run it with java command. You just need to find this war.

On my computer (Linux) :

java -jar /usr/share/jenkins/jenkins.war --httpPort=8888

With SBT plugin

external link

Install sbt plugin in standard way

Picture under is ilustrative with gatling but the same way you can find also sbt plugin !

gatling jenkins plugin.png

Configure Jenkins

Manage Jenkins -> Configure System

Manage Jenkins -> Manage Plugins -> Available

  • jdk 8 (you must install it also in your computer)
  • sbt (you must install it also in your computer : if your play development works you have it already. Just try to find it.)

jdk8jenkins.png

sbtjenkins.png

Create freestyle Jenkins job and configure it

New Item -> Freestyle project

freestyle.png

Now use SBT and jdk 8 from Jenkins configuration.

Next picture is just about SBT because JDK configuration is simple. In action you can see, you can use any combination that you need with Jenkins. On picture you can see : clean compile and dist.

-Dsbt.log.noformat=true

flag turns off the colour formatting, making test output legible in log files.

sbtii.png

Result

resultplayjenkins.png