Thursday, July 5, 2007

Bamboo, Ruby on Rails, Test Reports and RCov

Over the last day, I've had an opportunity to integrate Atlassian's bamboo with a Ruby on Rails project, which has been fruitful. It was actually pretty easy. Create a builder that runs Ruby (rather than Bash or Maven), point it at 'rake' with the appropriate target, and it builds.

If you want your test reports to be visible as test reports, you might want to look up the ci_reporter plugin and gem. This simply ensures that when your tests run, they generate JUnit-style XML files that many CI servers can pick up, including Bamboo.

If you add the rails_rcov plugin to your project, you can run the test:test:coverage goal in order to generate a coverage report. All you need to do then is tell Bamboo to treat it as an artifact, scoop up all the contents of coverage/test. Then, from your build results, you can go to the artifact tab, and pick up the resulting coverage report, nicely viewable in your web browser.

See Also
If you want to find out more about integrating Atlassian's Bamboo with Ruby on Rails, I recommend you not search for 'bamboo rails' or 'bamboo rake', both of which are likely to take you elsewhere. ;)

Are any of you using Bamboo and Rails together, and if so, do you have more interesting tips to add?


Adrian Hempel said...

Hi Geoffrey,

Thanks for sharing your experiences of using Bamboo with Ruby on Rails; It's a really helpful post for the Bamboo development team, and for RoR developers like yourself.

Is there any chance you can put up some screenshots to demonstrate how you've configured your RoR builds in Bamboo?

If there's anything that we can do to improve Bamboo's support for Ruby on Rails developers, we'd really like to hear from you and other members of the RoR community. Please drop us a line at the Bamboo discussion forum, or sign up for an account on JIRA, our issue tracker and submit your feature requests. All feedback is most welcome!

Thanks for your support. We really appreciate hearing about how you're doing great things with Bamboo.

Best Regards,

Adrian Hempel
Bamboo Developer

Geoffrey Wiseman said...

I've already filed a couple of issues in Bamboo's Jira instance, and voted for one or two others, so that's a good starting point.

But, yes, I was thinking if I got a moment, I'd post my configuration in more detail to get people started.

Anonymous said...
This comment has been removed by a blog administrator.