how to setup rspec run on jenkins build
- Click on build manually
- Trigger the build and run rspec as soon as a commit is made to master.
I have my jenkins running on port 8080.
- How to set up db in Meteor.js?
- Ruby - Finding the data in specific field/key of hash
- Show the latest commit value within a web application?
- “Updates were rejected” trying to push to Github
- Merge branch 'user' in git log
- Bundler could not find compatible versions for gem “spree_core"
In Jenkins I have the following configuration:
github project url: https://github.com/myuser/sample_app_rails_4/ git repository ur: https://github.com/myuser/sample_app_rails_4.git
In my github settings I have setup the jenkins webhook as follows:
Jenkins Hook url: pathtolocalhost:8080/github-webhook
In my rails app, i have the ci-reporter gem setup and this is what my rakefile looks like:
require File.expand_path('../config/application', __FILE__) require 'ci/reporter/rake/rspec' task :rspec => 'ci:setup:rspec' SampleApp::Application.load_tasks
Now, when I try to build manually through jenkins localhost the build fails with:
[sample_app] $ /usr/bin/rake rake aborted! Bundler::GemNotFound: Could not find activesupport-4.0.8 in any of the sources Build step 'Invoke Rake' marked build as failure
Also the build is not triggered automatically when i push a commit to master.
Can someone provide me any instructions as to what I might be doing wrong to get rspec running on build manually as well as automatically on commit?
One Solution collect form web for “how to setup rspec run on jenkins build”
I think the problem you are having is that you aren’t using
bundle exec rake. If you use the system rake, you won’t have all of the gems that you have bundled (I assume you are using bundler).