jenkinsci / rubymetrics-plugin

Ruby metric reports for Jenkins. Rcov, Rails stats, Rails notes and Flog.
https://plugins.jenkins.io/rubyMetrics/
25 stars 28 forks source link

Build step 'Publish Rails stats report' changed build result to FAILURE #23

Open leh opened 9 years ago

leh commented 9 years ago

Since we updated the rubymetrics plugin to 1.6.2 most of our builds startet to fail for no apparent reason with the message "Build step 'Publish Rails stats report' changed build result to FAILURE".

The log seems to be clean and I have found no information, why the build gets marked as failed. Do you have any idea how I could solve or debug this?

l8nite commented 9 years ago

+1 we're seeing this too.

pkuczynski commented 9 years ago

Can you send some details about your jenkins installation like platform and version? I just released small fix which enable this plugin to work with older versions of jenkins. Not sure if that would be any help in your case, but worth to try...

devopsdevon commented 9 years ago

+1 Experiencing the same thing with a fairly new Jenkins server and plugin version 1.6.3 on a fairly stock & sparse rails app. Running "rake stats" in the app directory seems to work just fine.

Here is a quick snippet from near the end of the build log: Finished in 24.13 seconds (files took 13.59 seconds to load) 54 examples, 0 failures Coverage report generated for Unit Tests to /opt/jenkins/jobs/MYJOB/coverage. 161 / 172 LOC (93.6%) covered. Coverage report Rcov style generated for Unit Tests to /opt/jenkins/jobs/MYJOB/coverage/rcov Tests completed Recording test results Publishing rails stats report... hudson.model.StreamBuildListener@c14f4f0 Build step 'Publish Rails stats report' changed build result to FAILURE Build failed, skipping rcov coverage report

@pkuczynski Some of the Jenkins and OS info I think you were looking for: Jenkins version: 1.575 Host OS: Amazon Linux AMI release 2014.03 (Amazon linux Java version: 1.7.0_65 App rails version and dependencies: rake (10.4.2) rails (4.1.8) actionmailer (= 4.1.8) actionpack (= 4.1.8) actionview (= 4.1.8) activemodel (= 4.1.8) activerecord (= 4.1.8) activesupport (= 4.1.8) bundler (>= 1.3.0, < 2.0) railties (= 4.1.8) sprockets-rails (~> 2.0)

If there is anything more specific you need or if you have any debugging steps etc. you want me to run, just let me know! Thanks.

jikamens commented 9 years ago

I'm running into this issue two. The the notes publish in the build is failing without any explanation in the logs even though "rake notes" works fine. Incredibly irritating.

jikamens commented 9 years ago

(I have rake plugin 1.8.0, rubymetrics plugin 1.6.3, jenkins 1.595.)

ketiko commented 9 years ago

:+1: Same here.

ketiko commented 9 years ago

Seems that

rake.perform(build, launcher, stringListener)

Is returning false and hence not very good error information is being returned.

bjones commented 9 years ago

Same issue with 1.6.3 and system rvm.

eLafo commented 9 years ago

Same issue here with jenkins 1.626, rubymetrics 1.6.3 and rake plugin 1.8.0

Has anyone found a clue?

Thanks in advance

liline commented 8 years ago

I'm also encountering this issue, was anyone able to find some clues?

liline commented 8 years ago

My solution will probably not work for everyone but on the off chance that someone had the same problem as me, hopefully this'll work for them.

My problem ended up being my tests - I was upgrading my application fromrails 3.2.x to 4.2.5 and still using gem 'ci_reporter'

Problem: bundle exec rake test:prepare ci:setup:minitest test

created this error:

_Recording test results
ERROR: Publisher hudson.tasks.junit.JUnitResultArchiver aborted due to exception
hudson.AbortException: No test report files were found. Configuration error?
...
Build failed, skipping rcov coverage report
Build step 'Publish Rcov report' marked build as failure_

Solution I had to change from gem 'ci_reporter', '~> 1.9.0' to gem 'ci_reporter_minitest', '1.0.0'

For this very specific scenario of mine, hopefully this helps someone out there.

eiapopeia commented 8 years ago

For me it helped to change the Rake Version in jenkins project configuration.

ralphct commented 8 years ago

I've ended up disabling the report for now :-(

I have Rake 10.4.2, Jenkins 1.650, Ruby 1.9, and the same output as devopsdevon above. I couldn't see anything about it in the console output or jenkins' server.log

xecutioner commented 8 years ago

Had the same issue . ssh'ed into the jenkins server instance and ran rake notes manually to receive error about missing js runtime.. sudo apt-get install nodejs

and everything worked perfectly.

bradical commented 8 years ago

For me it helped to change the Rake Version in jenkins project configuration.

@eiapopeia Me too. Upgrading Rake/Bundler ultimately fixed this.

brandonsturgeon commented 5 years ago

I'm also getting this error. Latest Rake and Bundler. I'm doing a self-hosted, non-containerized setup.

image