Build Rails applications using Hudson

878 views

Published on

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
878
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Build Rails applications using Hudson

  1. 1. Continuous IntegrationRails Project
  2. 2. Continuous IntegrationThe purpose of this presentation is to provide a step by step on how to build a continuous integration environment for a Rails project under Ubuntu.Here are the steps I followed, I will provide more details in the next slides:• Install Hudson• Configure Hudson• Run your integartion 2
  3. 3. Hudson Installation • sudo sh -c "echo deb http://hudsonci.org/debian binary/ > /etc/apt/sources.list.d/hudson.list“ • sudo apt-get update • sudo apt-get install hudson After this installation you should be able to access Hudson web console from this url: http://localhost:8080 3
  4. 4. Hudson Configration • Select "New Job" • Check option "Build a free-style software project" and enter a name. • Under "Source Code Management", select "SVN“ Enter: • Repository URL: http://blah/project/trunk Local module directory (optional): trunk 4
  5. 5. Hudson Configration • Select "Add Build Step" -> "Execute shell" Enter: # enter application root cd trunk # install missing gems jruby -S bundle install # set env vars export GEM_PATH=/usr/local/lib/ruby/gems/1.8/gems export RAILS_ENV=test # invoke rake jruby -S rake db:create db:migrate test:units test:functionals spec:requests 5
  6. 6. Build your application You can configure your build to be running after each 5 min for example: Under "Build Triggers", select "Poll SCM“ Enter: # Poll every 5 minutes */5 * * * * Click "Build Now" to test the configuration!! 6

×