149

我一直在寻找 Ruby on Rails 的持续集成解决方案,但对结果不太满意。我来自一家使用 CruiseControl.NET 的 .NET 商店,并且对它的易用性和丰富的状态/报告功能非常满意。

理想情况下,我正在寻找:

  • 明显的 Git/SVN 和 Test::Unit 集成

  • 与 Rake 和/或 Capistrano 集成

  • 显示构建状态的 Web 界面

  • 失败构建的电子邮件通知。

  • 桌面通知(可能通过 Growl)

  • 用于构建状态的 REST API

  • 用于在 UI 中运行其他代码分析工具和报告结果的插件框架

4

22 回答 22

83

I just went through the options here and thought I'd roll them up as of late 2011.

Integrity

After a near-death experience that left the still-linked-to website with outdated information and downed the demo site, this project has a spark of life again. But the documentation hasn't moved on, and lots and lots of the steps in the tutorial are just plain broken; I had to change references to gems, build some things out of band, and then I still couldn't get it working.

Cruise Control.rb

Dead simple: you just download it, run a command line to add your project (there is no UI for doing so), and run the Rails app. But there's no UI for editing your project, either, and there's no real integration with build artifacts aside from displaying links to them: you get no graphs of tests run, no trend lines, etc. I also had to adjust the routes.rb file to get the code linking working (the resources :projects line needs to move below all the other non-default routes).

TeamCity

This looks awesome, but the pay scale seems out of whack. 3 agents free and then when you're dependent you need to dole out hundreds of dollars. Personal Builds looks great, but don't have the budget.

Jenkins (née Hudson)

This is a Java stalwart and it is loaded up with a thousand options, so the UI is confusing and it's a chore to set up your projects. But once you set it up you get a whole lot of plugins that can pull from most anywhere, run most anything, and report most everything. The OS X Installer points Jenkins at /Users/Shared/Jenkins/Home but fails to create that directory or chown it to daemon (which is uses by default, and you should change to a new jenkins user so you can set up GitHub integration).

Others

I didn't really try these, but thought I'd mention why:

  • CI Joe wants to own the GitHub repo more than I want it, and its creators aren't even using it; they're on Jenkins.
  • Cerberus seems neatly small but doesn't have a UI and doesn't automatically publish build artifacts where others can see them.
  • BigTuna seems to be a CruiseControl.rb clone without the (already minimal) community support.
  • Bamboo looks really neat if you use JIRA and BitBucket, but we use neither. It does deploys but we already have those set up in Capistrano.

The Choice

We went with Jenkins, but I really wish one of the lighter-weight solutions had worked out.

于 2011-11-08T18:35:52.963 回答
41

CruiseControl.rb怎么样?

CruiseControl(思想工作)并写在Ruby. 非常易于使用Rake以集成您的其他工具,并且可以使用ruby​​-growl gem 进行通知。

于 2008-10-21T03:30:30.830 回答
27

您可能还想考虑Hudson。它是为 Java 项目而设计的,尽管有很多可用的插件可供选择,包括对 Ruby 和 Rake 的支持。它有一个非常有用的 Web 界面,并支持电子邮件通知以及许多其他功能(如 twitter 或巨型熊灯)。

The community is also very active and there have been several articles on hooking up Hudson with Selenium which you might be helpful for testing Rails applications on the browser side.

Another one look at is Team City which is free for small projects and teams (including commercial). I really like Team City and have used it before for other projects but currently we're using Mercurial for source control and Team City's support was a little too beta when we were considering it.

I switched from CruiseControl.net to Team City and was absolutely shocked at the improvement. I'm partial to Hudson though because of its similar feature set and very active community.

于 2008-10-21T06:33:41.943 回答
13

Circle is an advanced CI service for Rails (and other web apps). From your list, it supports the following:

  • Git and Test::Unit integration (also RSpec, Cucumber, Jasmine, Konacha integrations, and supports arbitrary extra test commands)
  • Integration with Rake and/or Capistrano (uses Rake to run commands and set up DBs, support continuous deployment using Capistrano or Heroku, or anything really)
  • A web interface showing the status of the build
  • Email notification of failed builds.
  • Desktop notification (through CCMenu/CCTray)
  • REST API for build statuses
  • Plugin framework for running other code analysis tools and reporting results in the UI (we can run arbitrary commands and support including their status as part of the build)

Joel and I spent a while chatting about this on the Stackoverflow podcast - check it out!


(edit) Disclaimer: Paul Biggar founded Circle as he states in his Stackoverflow profile

于 2012-08-23T01:03:18.373 回答
8

Semaphore is a new hosted CI app for Ruby and Rails apps. It integrates with GitHub, requires no setup and has a simple UI.

于 2012-06-12T11:09:59.893 回答
8

Updated Feb-2015

Codeship

There was a lack of development on Drone.io so I switched to Codeship and I'm thoroughly enjoying it. It's actively developed and improved, has great design and is very fast. Plus, for the bottom tier it's actually free (up to 100 builds per month) so it ended up being cheaper than Drone.io.

Original Answer

Drone.io

I just setup our main Ruby on Rails application with http://drone.io/. Was a piece of cake and it's got a great interface. I'd say worth checking out if you're looking for a simple, hosted solution.

于 2013-03-06T20:41:10.097 回答
7

Check out Tddium. Tddium support continuous integration, deployment and interactive testing of Ruby applications. It provides a managed environment with support for Selenium, Headless Webkit, and Solr. It hosts live Postgres, MySQL, Mongo, and Redis instances. And it automatically parallelizes large test suites.

于 2011-09-09T04:33:04.783 回答
7

Travis CI has become popular in the ruby world: http://travis-ci.org/

于 2012-03-19T19:40:20.660 回答
6

Cruisecontrol.rb 将是完美的匹配。

http://cruisecontrolrb.thoughtworks.com/

于 2008-10-21T03:31:23.183 回答
6

Like a number of people I was a huge fan of cruisecontrol.rb, but have recently switched my projects to Integrity.

Lightweight and easy to setup (much like cc.rb), but with a nicer interface.

于 2009-05-11T15:13:18.753 回答
5

BigTuna - written in Ruby, uses Rails and using itself as its CI.

于 2010-12-15T07:19:07.920 回答
5

You can give Codeship a spin and see if it works for you (I am one of the founders)

Cloud based Continuous Integration and Deployment(with special Heroku support)

The first four of your items are already implemented and work fine for a number of companies

  • The obvious Git/SVN and Test::Unit integration
  • Integration with Rake and/or Capistrano
  • A web interface showing the status of the build
  • Email notification of failed builds.

We are working on those features as well:

  • Desktop notification (potentially through Growl)
  • REST API for build statuses
  • Plugin framework for running other code analysis tools and reporting results in the UI
于 2012-08-20T10:04:12.093 回答
3

Noone here mentioned Atlassian's Bamboo. There is a nice tutorial-like article about Ruby on Rails CI using Bamboo:

http://blogs.atlassian.com/news/2009/05/bamboo_customer_8.html

于 2010-11-21T02:49:47.067 回答
3

Integrity seems to be a great solution. Deploying onto heroku is a breeze: http://elabs.se/blog/7-continuous-integration-testing-for-ruby-on-rails-with-integrity http://integrityapp.com

于 2011-03-08T11:52:40.080 回答
3

Do it yourself. Write a bash script to run tests and then run a deployment procedure if tests pass. Need notifications? Shoot yourself a plaintext email on success/failure. Need scheduler? Cronjob. This is $0/mo., and you will have a clue as to what you are doing. I do not see how paying someone $40/mo will help me do this in any way more efficient.

Consider for example: my deployment is failing because of an incorrectly configured asset pipeline (assets fail to precompile). This is not going to be caught with unit, functional, integration, regression, or any other tests. This error will not be caught by CI. The amount of time I would spend writing a bash script is likely to be less than the amount of time I would spend setting up a CI environment, and I'll save myself $40/mo.

Juuuuuust throwing my two pennies into the discussion ; )

于 2013-07-14T19:14:56.173 回答
1

Run Code Run might be what you need.

Edit: link removed since it no longer refers to the former Run Code Run site.

于 2009-06-03T17:43:54.143 回答
1

And then, there is CI Joe:

It's like an old rusty pickup truck: it might be smelly and gross, but it gets the job done.

We use it on a daily basis.

于 2010-12-02T03:53:10.737 回答
1

I only like CI joe, I have had issues with all the rest, CI Joe is the absolute minimum to get the job done, super Agile and reliable. The hudson source is horrible, and the UI does not appeal to me.

于 2011-12-16T09:48:46.533 回答
0

I just published a very simple Continuous Integration App for RubyOnRails + SVN/GIT. Maybe you should give it a try:

http://github.com/felipegiotto/Inotegration/tree/master

I took some ideas of measurement and testing tools and, after trying some CI tools and not liking anyone of them, I decided to build my own, without needing to build big XML files or any other configuration. Just the way Rails was made to be.

If you like, please send me some feedback..

Best regards,

Felipe Giotto.

于 2009-06-14T21:49:31.803 回答
0

Running CI after every commit seems rather expensive if you subscribe to the "commit often" philosophy. How about running a simple cronjob every few hours and email the results to a dev mailing list?

于 2010-03-11T03:26:04.117 回答
0

I just configured a Hudson/Jenkins for it. The ci_reporter gem can help formatting JUnit output, what expected by Hudson, and Hudson has a Rails plugin, so I can see rcov coverage, test reports, rails stats and even more.

于 2011-08-04T11:10:39.513 回答
0

You should consider looking at CloudMunch as well. This provides a polyglot platform to allow you to have different languages as part of your codebase, with rich set of build metadata.

于 2014-04-16T10:12:14.463 回答