Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Example about how to test your Play2 applications with GitHub and Travis CI
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  11 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
gildegoma  
View profile  
 More options Apr 14 2012, 12:42 pm
From: gildegoma <gilles.co...@gmail.com>
Date: Sat, 14 Apr 2012 09:42:08 -0700 (PDT)
Local: Sat, Apr 14 2012 12:42 pm
Subject: [Play 2.0] Example about how to test your Play2 applications with GitHub and Travis CI

Hi Play2 Developers !

Are you interested in free and powerful Continuous Integration for your
applications based on Play2 Framework ? Yes, so just try Travis CI<http://travis-ci.org/>
!

Here is an example about how you can test a Play2 application on
Travis: https://github.com/gildegoma/travis-ci-ScalaOnPlay-sample
The current example runs the test with release 2.0 (other variant would
consist in building all from source, Play20 included (see pending issue
https://github.com/gildegoma/travis-ci-ScalaOnPlay-sample/issues/1)

Have fun! Feedbacks are welcome...
Gilles

Some more notes (a bit out of post's scope, sorry I can't resist to drop
some more ideas in the air ;-)

   - I'm pretty sure it will be easy to setup testing of Play2 Modules on
   Travis as well, but I did not work on that point so far.
   - For people interested about how to build Play20 framework itself on
   Travis, you can have a look
   on https://github.com/gildegoma/Play20/tree/pr-integrate-travis-ci. So far
   I have not opened any pull request on master project (I think that
   according to current guidelines of Play20 project such kind of change would
   not be evaluated for now). Even if main project is tested on cloudbees, I
   think it could be a nice improvement for the general fork/pull-request
   community process, if PRs are publicly tested by Travis, before their
   integration.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matthieu  
View profile  
 More options Apr 23 2012, 4:36 pm
From: Matthieu <matthieu.guiller...@gmail.com>
Date: Mon, 23 Apr 2012 13:36:41 -0700 (PDT)
Local: Mon, Apr 23 2012 4:36 pm
Subject: Re: [Play 2.0] Example about how to test your Play2 applications with GitHub and Travis CI

Thanks your example.

I just had to do a 'chmod +x travis/setup' in order to avoid an error on
Travis and then it worked like a charm.

Matthieu


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "[Play 2.0] Example about how to test your Play2 applications with GitHub and Travis CI" by Ivan Meredith
Ivan Meredith  
View profile  
 More options Apr 23 2012, 6:21 pm
From: Ivan Meredith <i...@ivan.net.nz>
Date: Tue, 24 Apr 2012 10:21:43 +1200
Local: Mon, Apr 23 2012 6:21 pm
Subject: Re: [play-framework] Re: [Play 2.0] Example about how to test your Play2 applications with GitHub and Travis CI
CloudBees have a service in early beta  called BuildHive. It provides
a one-click integration with github to set up jobs from repos.  You do
not need a CloudBees account to use it, just oauth with github.

For play2 it needs no extra files at all to build.

https://buildhive.cloudbees.com/

As I said above, it is in early beta - so we are looking for feedback
and it may not work 100% just yet. However I have a play2 app building
on it :)

- Ivan, CloudBees Engineering

On 24 April 2012 08:36, Matthieu <matthieu.guiller...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
gildegoma  
View profile  
 More options Apr 24 2012, 7:10 pm
From: gildegoma <gilles.co...@gmail.com>
Date: Tue, 24 Apr 2012 16:10:46 -0700 (PDT)
Local: Tues, Apr 24 2012 7:10 pm
Subject: Re: [play-framework] Re: [Play 2.0] Example about how to test your Play2 applications with GitHub and Travis CI

Hi again Ivan,

I noticed a few more things after sending my first response, hence these
updates:

I found where you can configure:

   - branches to build :-)
   - the shell script to run for 'unkown template' project :-) but if a
   template has been found (e.g. 'sbt'), shell script cannot be redefined...
   :-/

Your play2 sample indeed builds well with 'sbt clean test', that install
Play2 dependencies on the fly
(https://buildhive.cloudbees.com/job/hadashi/job/play2-test-app/lastBu...

[info] Resolving play#play_2.9.1;2.0 ...                                        
[info] Resolving play#templates_2.9.1;2.0 ...

But the build run #1 of my sample project failed a few steps before because
commons-httpclient.jar was not possible to download (see
https://buildhive.cloudbees.com/job/gildegoma/job/travis-ci-ScalaOnPl...).

Can I force a new job to start? I cannot find a manual trigger...

Anyway, thanks again for the very interesting news... being impatient for
next steps (more documentation, more stable service, more features :).

Regards, Gilles


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
gildegoma  
View profile  
 More options Apr 24 2012, 7:19 pm
From: gildegoma <gilles.co...@gmail.com>
Date: Tue, 24 Apr 2012 16:19:13 -0700 (PDT)
Local: Tues, Apr 24 2012 7:19 pm
Subject: Re: [play-framework] Re: [Play 2.0] Example about how to test your Play2 applications with GitHub and Travis CI

Hi Ivan!

*SORRY: I mixed myself and my 'second' answer has been posted while I
actually failed to send first reponse... which I include now. Sorry, I
think I better have to read Google Groups Help, but it's time to sleep now
:-/*

Thank you for the announcement. BuildHive/GitHub integration is smooth,
quite similar as Travis/GitHub. Nice concurrence in perspective!

I actually tested 3 Projects (1 Play2 and 2 pure Scala) with following
results:

   - *Build failed for my Play2 Sample App:*  
      -
      https://buildhive.cloudbees.com/job/gildegoma/job/travis-ci-ScalaOnPl...
      - there was a dependency download problem that interrupted the build,
      I think this should not happen (again/always)
      - 'sbt' template *is auto-detected *=> test run with 'sbt test'
      command, which is not enough to run 'play test' action (what is actually
      the goal of my original post)
      - is there (alreay) a way to override/force the builder
      template/script in BuildHive ?
   - Wrong builder for pure Scala/SBT projects (like Salat or Akka):
      - https://buildhive.cloudbees.com/job/gildegoma/job/salat/1/console
      - https://buildhive.cloudbees.com/job/gildegoma/job/akka/1/console
      - 'sbt' template* should be auto-detected*, but it's not the case (/bin/sh
      -xe /tmp/hudson6904688027096127531.sh, instead sbt test)

Configuration auto-detection are nice features, but anyway it is a must to
let user override/reconfigure default settings... Travis-CI is already
quite mature, BuildHive can for sure take some good influences from it :-).

on https://buildhive.cloudbees.com/template/, I see that the list of build
templates is already quite nice (sbt, maven, gradle, bundler/rake, ...). I
would recommend you to setup a Play2 template, and then BuildHive wins one
point in the race with Travis ;-)

I am looking forward a new discussion thread about BuildHive upcoming
features !

Cheers, Gilles


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Example about how to test your Play2 applications with GitHub and Travis CI" by gildegoma
gildegoma  
View profile  
 More options Apr 24 2012, 7:42 pm
From: gildegoma <gilles.co...@gmail.com>
Date: Tue, 24 Apr 2012 16:42:52 -0700 (PDT)
Local: Tues, Apr 24 2012 7:42 pm
Subject: Re: [Play 2.0] Example about how to test your Play2 applications with GitHub and Travis CI

Hi Matthieu,

Thank you very much for the feedback! Yeah, missing 'x' permission is
common pitfall when doing copy-paste of shell script content. Actually, I
created this extra script 'travis/setup' in a Don't Repeat Yourself and
clean code spirit, but it's not straightforward and maybe error-prone...

I thus created another variant where the complete Travis settings fit in
main .travis.yml (no more extra shell script to integrate into project).
Check it here:
https://github.com/gildegoma/travis-ci-ScalaOnPlay-sample/blob/travis...
(not yet merged into master)

Let me know which variant you find better... My current feeling: +1 for
this new variant (everything in .travis.yml).

*Precision:* Comments from Ivan Meredith show how Play projects can
auto-download the Play dependency via Maven/Ivy/sbt. This is also quite
nice way to do it, and it works fine either on BuildHive/Jenkins or Travis.
My idea here was merely to save download time/traffic, with only a single
file to download (play-2.0.zip release), which is also matches with
Installation Guide of Play Framework (see
http://www.playframework.org/documentation/2.0/Installing)

Regards, Gilles

Le lundi 23 avril 2012 22:36:41 UTC+2, Matthieu a écrit :


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "[Play 2.0] Example about how to test your Play2 applications with GitHub and Travis CI" by Ivan Meredith
Ivan Meredith  
View profile  
 More options Apr 24 2012, 7:56 pm
From: Ivan Meredith <i...@ivan.net.nz>
Date: Wed, 25 Apr 2012 11:56:36 +1200
Local: Tues, Apr 24 2012 7:56 pm
Subject: Re: [play-framework] Re: [Play 2.0] Example about how to test your Play2 applications with GitHub and Travis CI
Thanks for the feedback!

SBT detection sucks atm because I only made it work for play2. Ive
updated it a bit and now it detects akka and maybe others.

I will work on getting things going. However, your play2 app should be
working, unsure why its not.

On 25 April 2012 11:19, gildegoma <gilles.co...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ivan Meredith  
View profile  
 More options Apr 24 2012, 8:13 pm
From: Ivan Meredith <i...@ivan.net.nz>
Date: Wed, 25 Apr 2012 12:13:19 +1200
Local: Tues, Apr 24 2012 8:13 pm
Subject: Re: [play-framework] Re: [Play 2.0] Example about how to test your Play2 applications with GitHub and Travis CI
Can you try making those jobs again? I've updated the template

On 25 April 2012 11:19, gildegoma <gilles.co...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Example about how to test your Play2 applications with GitHub and Travis CI" by Matthieu
Matthieu  
View profile  
 More options Apr 25 2012, 2:04 am
From: Matthieu <matthieu.guiller...@gmail.com>
Date: Tue, 24 Apr 2012 23:04:51 -0700 (PDT)
Local: Wed, Apr 25 2012 2:04 am
Subject: Re: [Play 2.0] Example about how to test your Play2 applications with GitHub and Travis CI

Hi Gilles,

I've just tested the variant with all the configuration in the .travis.yml
file and it works well.

I prefer this variant because It's easier to understand and configure, and
it also reduces the risk of error.

Matthieu


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "[Play 2.0] Example about how to test your Play2 applications with GitHub and Travis CI" by Gilles Cornu
Gilles Cornu  
View profile  
 More options Apr 25 2012, 6:41 am
From: Gilles Cornu <gilles.co...@gmail.com>
Date: Wed, 25 Apr 2012 12:41:47 +0200
Local: Wed, Apr 25 2012 6:41 am
Subject: Re: [play-framework] Re: [Play 2.0] Example about how to test your Play2 applications with GitHub and Travis CI

Hi Ivan,

I started a second job for Akka, and now 'sbt' detection indeed works fine, but the related command ('sbt test') is not valid in BuildHive environment. You should either:
- directly execute java -jar /opt/sbt/sbt-launch-0.11.0.jar clean test (as you do for your Play project)
or
- configure some symlink/script alias to "java -jar /opt/sbt/sbt-launch-0.11.0.jar" (example: https://github.com/mxcl/homebrew/blob/master/Library/Formula/sbt.rb#L10)

See https://buildhive.cloudbees.com/job/gildegoma/job/akka/2/console

I also tried to re-run my Play2 app sample, but it still fails on the same step

see https://buildhive.cloudbees.com/job/gildegoma/job/travis-ci-ScalaOnPl...

My questions and remarks are now:
- It seems that the project workspace is permanently stored on BuildHive server-side between test runs. That's quite fine…
- Now I'm not able anymore to find the Menu 'configure' in the project context (where it was possible to select which branches must be built, which test script must be executed,…)
- I would recommend to start a new discussion thread dedicated to BuildHive itself (maybe on another group?). It's going to get messy here…

I found interesting documentation http://wiki.cloudbees.com/bin/view/DEV/BuildHive. Maybe we can further collaborate through IRC #cloudbees channel, as proposed in BuildHive help.

I'm looking forward to seeing these jobs succeed on BuildHive ;-)

On 25 avr. 2012, at 02:13, Ivan Meredith wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gilles Cornu  
View profile  
 More options Apr 25 2012, 6:43 am
From: Gilles Cornu <gilles.co...@gmail.com>
Date: Wed, 25 Apr 2012 12:43:03 +0200
Local: Wed, Apr 25 2012 6:43 am
Subject: Re: [play-framework] [Play 2.0] Example about how to test your Play2 applications with GitHub and Travis CI
Hi Mathieu,

Thanks for positive feedback, I thus merged it to master :-)

On 25 avr. 2012, at 08:04, Matthieu wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »