Nick Sieger: Continuous Integration Goodness(TM) for Your Ruby Project http://blog.nicksieger.com/articles/2007/01/06/continuous-integration-goodness-tm-for-your-ruby-project en-us 40 "Continuous Integration Goodness(TM) for Your Ruby Project" by Simon Harris <p>Rock on! Just integrated my rails plugins with Pulse. Sweet!</p> Fri, 16 Mar 2007 12:49:14 +0000 urn:uuid:1e8321e8-0127-4737-8e73-a7b55b62af57 http://blog.nicksieger.com/articles/2007/01/06/continuous-integration-goodness-tm-for-your-ruby-project#comment-225 "Continuous Integration Goodness(TM) for Your Ruby Project" by Nick <p>@Chaskunz: All this does is generate an XML file after running your Ruby tests or specs. The files do flag test failures, but it&#8217;s up to the CI system to recognize that.</p> Sat, 03 Feb 2007 01:41:59 +0000 urn:uuid:ebac2a3b-427b-42cc-b703-7bc03fd28359 http://blog.nicksieger.com/articles/2007/01/06/continuous-integration-goodness-tm-for-your-ruby-project#comment-207 "Continuous Integration Goodness(TM) for Your Ruby Project" by Chaskunz junit can report whether a test has failed so that CruiseControl can pick that up and tag the build as failed. <junit failureproperty='junit_test_failed'></junit> <fail message='One or more JUnit tests failed' if='junit_test_failed' /> Can that be done with your plugin? Our developers tend to only look at the results page if it&#8217;s titled &#8220;Build Failed&#8221; Fri, 02 Feb 2007 21:16:49 +0000 urn:uuid:517459a2-2a2a-4382-8faf-f95cd12f960b http://blog.nicksieger.com/articles/2007/01/06/continuous-integration-goodness-tm-for-your-ruby-project#comment-206 "Continuous Integration Goodness(TM) for Your Ruby Project" by Slava Imeshev <p>Nick,</p> <p>You might also want to check our <a href='http://www.viewtier.com/products/parabuild/index.htm' rel="nofollow">Parabuild</a>. It will with any command line build tool and provides JUnit statistics.</p> Mon, 08 Jan 2007 19:43:56 +0000 urn:uuid:d925a1db-2806-49c9-a68a-5770e044334c http://blog.nicksieger.com/articles/2007/01/06/continuous-integration-goodness-tm-for-your-ruby-project#comment-191 "Continuous Integration Goodness(TM) for Your Ruby Project" by Nick <p>@Mike: Bamboo appears to work pretty well for Ruby right now. There are probably quite a few things (like what I did here) to make the integration tighter and track more items on Ruby and Rails projects (like the output of &#8220;rake stats&#8221; and possibly rcov coverage data). Detecting and adding a Rake builder would be a nice step.</p> <p>There&#8217;s also potential for JRuby integration &#8211; you could ship it and possibly have cross-platform, out-of-the-box Rake support, which would be pretty sweet.</p> <p>Feel free to email me or come look for me in #jruby on freenode if you want to discuss further.</p> Mon, 08 Jan 2007 03:32:39 +0000 urn:uuid:306dbabb-7bad-4c75-90db-3605067e9b6c http://blog.nicksieger.com/articles/2007/01/06/continuous-integration-goodness-tm-for-your-ruby-project#comment-190 "Continuous Integration Goodness(TM) for Your Ruby Project" by Mike Cannon-Brookes <p>Nick - thanks for the plug. Most appreciated! </p> <p>While I have you, is there anything you think we could do to <em>better</em> support Ruby projects out of the box? I&#8217;m sure the team would love to hear about them. </p> <p>We&#8217;re hardly Ruby experts here, but have dabbled quite a bit. I expect the features required by true Ruby houses would be far more useful coming from you than me :)</p> <p>Thanks again, Mike</p> Sun, 07 Jan 2007 22:57:22 +0000 urn:uuid:32d36a3c-b982-44cc-b660-58025f0d9167 http://blog.nicksieger.com/articles/2007/01/06/continuous-integration-goodness-tm-for-your-ruby-project#comment-189 "Continuous Integration Goodness(TM) for Your Ruby Project" by Nick <p>@Chris: I haven&#8217;t checked out Cerberus yet, thanks for the link. I&#8217;ve been using Bamboo because we have a bunch of Java projects to build also.</p> <p>Thanks for reporting the require issue. How did I miss that?!? Fixed now in svn.</p> Sun, 07 Jan 2007 06:06:03 +0000 urn:uuid:75965671-4d73-4deb-aec3-5da0fcc66a49 http://blog.nicksieger.com/articles/2007/01/06/continuous-integration-goodness-tm-for-your-ruby-project#comment-188 "Continuous Integration Goodness(TM) for Your Ruby Project" by Chris Carter <p>Hey, There&#8217;s a small issue with it, the test unit reporter does not require &#8216;ci/reporter/core&#8217; which causes errors.</p> Sun, 07 Jan 2007 05:23:27 +0000 urn:uuid:a574a230-9f7d-46ef-8b9e-eff040f68418 http://blog.nicksieger.com/articles/2007/01/06/continuous-integration-goodness-tm-for-your-ruby-project#comment-187 "Continuous Integration Goodness(TM) for Your Ruby Project" by Luke Francl <p>Ah, that&#8217;s awesome.</p> <p>I was thinking of doing this so I could use Hudson for doing continuous integration (check it out if you haven&#8217;t &#8211; it&#8217;s awesome, and Free Software, too).</p> <p>But, now someone did it for us! </p> Sat, 06 Jan 2007 19:25:41 +0000 urn:uuid:ee1df35a-d6bb-401a-9348-ce8591fd82af http://blog.nicksieger.com/articles/2007/01/06/continuous-integration-goodness-tm-for-your-ruby-project#comment-185 "Continuous Integration Goodness(TM) for Your Ruby Project" by Chris Carter <p>Have you seen <a href='http://cerberus.rubyforge.org/' rel="nofollow">Cerberus</a>?</p> Sat, 06 Jan 2007 19:10:04 +0000 urn:uuid:2a4784de-fa02-499a-8e47-6d458e170653 http://blog.nicksieger.com/articles/2007/01/06/continuous-integration-goodness-tm-for-your-ruby-project#comment-184 "Continuous Integration Goodness(TM) for Your Ruby Project" by Pat Eyler <p>I&#8217;d love to see a gem (since I don&#8217;t do any real rails work).</p> Sat, 06 Jan 2007 17:41:27 +0000 urn:uuid:318b7eba-6979-409c-97ad-cae41729139f http://blog.nicksieger.com/articles/2007/01/06/continuous-integration-goodness-tm-for-your-ruby-project#comment-182 Continuous Integration Goodness(TM) for Your Ruby Project <p>As much as we&#8217;d like to think we live in a Ruby-glasses-colored world, the fact is there are plenty of neat toys out there that don&#8217;t know a bit about us. One that I&#8217;m currently enamoured with is <a href="http://confluence.atlassian.com/display/BAMBOO">Bamboo, Atlassian&#8217;s new continuous integration server</a>. But, most commercial CI products are aiming for a wider market, and that means Java and Ant. Ant and JUnit predate Rake and Test::Unit by a few years, so I&#8217;m afraid they beat us to the punch, so that now the <a href="http://ant.apache.org/manual/OptionalTasks/junit.html">JUnit Ant task&#8217;s</a> XML format is pretty much the first consideration for a continuous integration server to understand in order to display a test report for a build.</p> <p>Where does that leave us Rubyists who want to play along with the bigs? <a href="http://svn.caldersphere.net/svn/main/ci_reporter">Right here!</a>. With support for not just <a href="http://blog.nicksieger.com/articles/tag/rspec">RSpec</a>, but Test::Unit too.</p> <p>Right now, it&#8217;s packaged as a Rails plugin, because I&#8217;m lazy and I don&#8217;t need anything else right now. If you&#8217;re interested in a gem, please leave a comment. To install into your Rails app, the usual:</p> <div class="typocode"><pre><code class="typocode_default ">./script/plugin install http://svn.caldersphere.net/svn/main/ci_reporter</code></pre></div> <p>That&#8217;s it! Now all you have to do is have your CI server invoke an extra target before the main target that runs your tests.</p> <p>For RSpec,</p> <div class="typocode"><pre><code class="typocode_default ">rake ci:setup_rspec spec</code></pre></div> <p>will leave one XML file per context in the <code>spec/reports</code> directory (creating it if it doesn&#8217;t exist).</p> <p>For Test::Unit,</p> <div class="typocode"><pre><code class="typocode_default ">rake ci:setup_testunit test</code></pre></div> <p>will leave one XML file per test case class in the <code>test/reports</code> directory.</p> <p>Most CI servers have configuration telling them where to look for test reports. Simply plug in one of these directories, and you&#8217;re set. Now sit back and watch your test or spec failures get tracked in your automated builds.</p> <p><img src="/files/test-results.png" alt="test results" title="test results"/></p> Sat, 06 Jan 2007 15:42:00 +0000 urn:uuid:e3f1c8a2-8050-44b8-a1f5-02cecb0ff92c Nick Sieger http://blog.nicksieger.com/articles/2007/01/06/continuous-integration-goodness-tm-for-your-ruby-project ruby continuousintegration junit ant rake http://blog.nicksieger.com/articles/trackback/181