-
Notifications
You must be signed in to change notification settings - Fork 2.3k
RailsAdmin uses Hudson as its continuous integration server.
- Test builds are available for public browsing at ci.railsadmin.org
- An RSS feed for following failed builds is available at feed://ci.railsadmin.org/job/RailsAdmin/rssFailed
RailsAdmin is tested with
- jruby-1.6.3 [ linux-i386-java ]
- rbx-1.2.4-20110705 [ ]
- ree-1.8.7-2011.03 [ i386 ]
- ruby-1.8.7-p352 [ i386 ]
- ruby-1.9.2-p290 [ i386 ]
and
- MySQL
- PostgreSQL
- SQLite3
This document describes the Hudson setup used with RailsAdmin in case there's need to duplicate it manually.
- Install key for the hudson repository:
wget -O - http://hudson-ci.org/debian/hudson-ci.org.key | sudo apt-key add -
- Add Hudson as source to /etc/apt/sources.list:
deb http://hudson-ci.org/debian binary/
- Install Hudson:
sudo apt-get update
sudo apt-get install hudson
- Install ruby1.9-dev to enable native extension building on Rubinius:
sudo apt-get install ruby1.9-dev
-
Install RVM for the user hudson with rubies 1.8.7, 1.9.2, jruby, rbx-1.2.3 and ree. Also install bundler gem for each ruby.
-
Start Hudson:
sudo /etc/init.d/hudson start
- Hudson should be now accessible with a web browser at:
http://YOUR_SERVER_IP:8080/
-
Go to
Manage Hudson > Configure system
-
Check
Enable security
-
Select
Disable
forTCP port for JNLP slave agents
-
Select
Hudson's own user database
-
Select
Matrix-based security
-
Create user
Neo
;) -
Check all ACL rules in the table for user
Neo
-
Select only
Overall > Read
andJob > Read
for system userAnonymous
-
Check
Prevent Cross Site Request Forgery exploits
-
Save (Button is in the very bottom of the screen)
-
Go to Manage
Hudson > Manage Users
-
Create user with username
Neo
- Install following plugins via
Manage Hudson > Manage plugins
Hudson CVS Plug-in
Git Plugin
Github plugin
Locale plugin
Maven Integration plugin
Hudson Rake plugin
Hudson Ruby Plugin
Hudson ruby metrics plugin
Hudson SSH Slaves plugin
Subversion Plugin
-
Go to
Manage Hudson > Configure system
-
Type
1
in to# of executors
to lower CPU usage. -
Type
1800
in toQuiet period
which will make Hudson wait half an hour before starting builds. This will conserve CPU and disk usage a lot during times when commits get pushed at high rate as each new build request during the quiet period will reset the build stack and restart quiet period. -
Type
en
in toLocale => Default Language
and checkIgnore browser preference and force this language to all users
. Note: At the time of writing Finnish translation was incomplete and confusing so I wanted to disable translations completely. -
Save (Button is in the very bottom of the screen)
-
Click
New Job
link on Hudson frontpage -
Type
RailsAdmin
as theJob name
, selectBuild free-style software project
and clickOk
-
Fill in settings:
Github project [ https://github.com/sferik/rails_admin/ ]
[*] Discard Old Builds
Max number of builds to keep [ 10 ]
Source Code Management
[*] Git
Repositories URL of repository [ git://github.com/sferik/rails_admin.git ]
Branches to build Branch Specifier (blank for default) [ master ]
Repository browser (githubweb)
URL [ https://github.com/sferik/rails_admin/ ]
Build Triggers
[*] Trigger builds remotely (e.g., from scripts)
Authentication Token [ INSERT A RANDOM TOKEN HERE ]
Configuration Matrix
User-defined Axis
Name [ CI_RUBY_VERSION ]
Values [ 1.9.2 1.8.7 ree jruby rbx-1.2.3 ]
User-defined Axis
Name [ CI_DB_ADAPTER ]
Values [ sqlite3 postgresql mysql ]
[*] Run each configuration sequentially
Build
Execute shell
Command [ bash -l -c "rvm use $CI_RUBY_VERSION && export CI_DB_ADAPTER=$CI_DB_ADAPTER && rm -f Gemfile.lock && bundle install && cd spec/dummy_app && rm -f Gemfile.lock && bundle install && bundle exec rake rails_admin:prepare_ci_env --trace && cd ../../ && bundle exec rake spec --trace" ]
- Save the job
-
Goto RailsAdmin repository's administrative view in GitHub
-
Select
Service Hooks
and add aPost-Receive URLs
type service hook fromAvailable Service Hooks
-
Type http://YOUR_SERVER_IP:8080/job/RailsAdmin/build?token=YOUR_TOKEN to URL
- Install Postgres 9.0, create user
rails_admin
and databaseci_rails_admin
- Install MySQL 5.1 (+ dev package for the mysql gem), create user
rails_admin
and databaseci_rails_admin
- Configure Nginx as proxy for Hudson accessible at
http://ci.railsadmin.org
- Hudson wiki: Installing Hudson on Ubuntu
- Install CI Hudson for Ruby on Ubuntu
- Setting up Hudson behind Nginx
- Setting up Hudson on port 80 on a Debian or Ubuntu machine
The first part of this documentation was written after the actual installation, so there may be factual errors. The most important part though is the job settings, and that has been copied directly from working Hudson installation and is correct.