Jenkins and rails app - Le Dinh Vu
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Jenkins and rails app - Le Dinh Vu

on

  • 1,282 views

 

Statistics

Views

Total Views
1,282
Views on SlideShare
1,282
Embed Views
0

Actions

Likes
1
Downloads
5
Comments
1

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as OpenOffice

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • hi ban,

    Minh dang can setup jenkins cho RoR project. Co gi co the add nick skype: h4inguy3n de minh hoi mot ty nhen. Thanks ban nhieu
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Jenkins and rails app - Le Dinh Vu Presentation Transcript

  • 1. Jenkins and Rails app
  • 2. Agenda 1. Install Jenkins on Ubuntu 2. Install Ruby using RVM 3. Install needed Jenkins Plugins 4. Install needed Gems 5. How Jenkins works 6. Demo
  • 3. Install Jenkins on Ubuntu # Install sudo apt-get install jenkins #-> Home: /var/lib/jenkins # Start service sudo service jenkins start Default Jenkins URL (localhost): 0.0.0.0:8080
  • 4. Install Ruby using RVM 1. Install RVM, Ruby and Rails # Install requirements (as root user) sudo apt-get --no-install-recommends install build-essential openssl nodejs libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev gawk libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev libgdbm-dev ncurses-dev automake libtool bison subversion pkg-config libffi-dev 2. Install RVM and Ruby for Jenkins user sudo su - jenkins # install RVMcurl -L https://get.rvm.io | bash -s stable # Make "rvm" as command echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm' >> ~/.bashrc # Install Ruby and Rails rvm install 1.9.3 && gem install rails
  • 5. Install needed Jenkins' plugins GitHub API Plugin This plugin provides GitHub API for other plugins. GitHub plugin This plugin integrates GitHub to Jenkins. Github Pull Request Builder This plugin builds pull requests in github and report results. Jenkins GIT plugin This plugin integrates GIT with Jenkins. Jenkins Rake plugin The Rake plugin allows to execute rake task from Jenkins. Jenkins ruby metrics plugin This plugin integrates a bunch of ruby coverage tools (Rcov, Saikuro, Rails stats...) to Jenkins. Currently it just supports Rcov reports.
  • 6. Install needed Jenkins' plugins GitHub API Plugin This plugin provides GitHub API for other plugins. GitHub plugin This plugin integrates GitHub to Jenkins. Github Pull Request Builder This plugin builds pull requests in github and report results. Jenkins GIT plugin This plugin integrates GIT with Jenkins. Jenkins Rake plugin The Rake plugin allows to execute rake task from Jenkins. Jenkins ruby metrics plugin This plugin integrates a bunch of ruby coverage tools (Rcov, Saikuro, Rails stats...) to Jenkins. Currently it just supports Rcov reports.
  • 7. Needed Gems # Gemfile group :test do gem 'rspec-rails' gem 'guard-rspec' gem 'shoulda-matchers' gem 'rb-inotify', '~> 0.9' gem 'factory_girl_rails' gem 'simplecov' gem 'simplecov-rcov' gem 'ci_reporter', '1.8.0' end # spec/spec_helper.rb require 'simplecov' require 'simplecov-rcov' SimpleCov.formatter = SimpleCov::Formatter::RcovFormatter SimpleCov.start
  • 8. How it works
  • 9. Demo • Adding new Github project • Configuring build • Building project • Checking results • Using Github pull request builder • Using Github service hook * Note: For private github project, need to remove pass phase from ssh key.
  • 10. Links and References https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+Ubuntu https://github.com/nicksieger/ci_reporter https://github.com/janinko/ghprb https://help.github.com/articles/post-receive-hooks
  • 11. Thank you for listening.