Rvm and Jenkins Setup

RVM and Jenkins setup

try:

. $(/home/RVM_USER/.rvm/bin/rvm env 1.9.3@rails-3.2.3 --path)

make sure you run the stable RVM:

rvm get stable

NOTE:
Last Jenkins version does not always accept "source", but ".".
RVM_USER is the user that installed RVM.
Alternatively you can also export the RVM command in the main PATH.

Jenkins using wrong version of Ruby(rvm)

I ran into this problem too. It turned out that there is an issue if you install rvm as root. We had to fully uninstall rvm and reinstall as the jenkins user, after which the plugin correctly loaded rubies.

You can detect this problem by listing the contents of the directory pointed by Jenkins's $HOME variable. If there is no .rvm directory then you may need to reinstall.

How to set up a CI environment using jenkins, rvm and cucumber

Okay I will try and help you as best I can.

  1. poll for any changes to github

This can be easily done with the Github Plugin located here

  1. if there are, run the build script: a. migrate the development and test dbs?(does that mean i have to put the config/database.yml in my
    repo?) b. run cucumber c. if all tests pass go to 3, else fail

Then all you would is run the build script you have configure in the in the build from

Select "Add Build Step" -> "Execute shell".

You can either do that which is probably what I would do because when you create build you want them to be portable so you can start up in new jenkins instances, so you dont have to setup your build machine, with build specific files.

Then you run your tests, if they fail the build should fail regardless here is some information on running ruby on rails tests. if you need to manually fail a build in a script based on a result usually exiting a script with non-zero will fail the build. If not continue and run your rake and deployment scripts.

Just a few notes on Jenkins it wont do everything for you but if you can do it manaually Jenkins can automate it. So anything you have setup running manually with a little bit of effort you can get up and running automated with Jenkins

Here is another answer you might find helpful in your general setup and ideology behind Jenkins.

Goodluck!



Related Topics



Leave a reply



Submit