CI/CD of Ruby On Rails using Jenkins

Please visit my website and subscribe to my youtube channel for more articles

  1. Jenkins — Install Jenkins from here
  2. Git — sudo yum install git
  1. Go To Manage Jenkins -> Configure System -> Search for Rake
which rvm
which ruby
Image for post
Image for post
RVM and Ruby Path
Image for post
Image for post
rvm home path
sudo passwd jenkins
vi /etc/sudoers
jenkins ALL=NOPASSWD: ALL
sudo -su jenkins
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDBcurl -sSL https://get.rvm.io | bash -s stable --ruby
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
Image for post
Image for post
Image for post
Image for post
bundle install
RAILS_ENV=test bundle exec rake db:migrate
RAILS_ENV=test bundle exec rspec — format RspecJunitFormatter — out results.xml
Image for post
Image for post
Image for post
Image for post
Image for post
Image for post
Image for post
Image for post
Image for post
Image for post
Unit Test Report

Devops Automation Enginneer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store