TheMrbikus
TheMrbikus

Reputation: 733

Why Jenkins "BUILD SUCCESSFUL", but "Finished: FAILURE"?

I set up Jenkins job with php template http://jenkins-php.org/ and also using https://github.com/sebastianbergmann/money for test. After building is finished, I got a message:

BUILD SUCCESSFUL
Total time: 58 seconds
[WARNINGS] Parsing warnings in console log with parser PHP Runtime
[CHECKSTYLE] Collecting checkstyle analysis files...
[CHECKSTYLE] Finding all files that match the pattern build/logs/checkstyle.xml
[CHECKSTYLE] Parsing 1 file in /var/lib/jenkins/jobs/New job/workspace
[CHECKSTYLE] Successfully parsed file /var/lib/jenkins/jobs/New job/workspace/build/logs/checkstyle.xml with 0 unique warnings and 0 duplicates.
[PMD] Collecting PMD analysis files...
[PMD] Finding all files that match the pattern build/logs/pmd.xml
[PMD] Parsing 1 file in /var/lib/jenkins/jobs/New job/workspace
[PMD] Successfully parsed file /var/lib/jenkins/jobs/New job/workspace/build/logs/pmd.xml with 0 unique warnings and 0 duplicates.
[DRY] Collecting duplicate code analysis files...
[DRY] Finding all files that match the pattern build/logs/pmd-cpd.xml
[DRY] Parsing 1 file in /var/lib/jenkins/jobs/New job/workspace
[DRY] Successfully parsed file /var/lib/jenkins/jobs/New job/workspace/build/logs/pmd-cpd.xml with 0 unique warnings and 0 duplicates.
Recording plot data
Publishing Clover coverage report...
Clover xml file does not exist in: /var/lib/jenkins/jobs/New job/workspace called: build/logs/clover.xml and will not be copied to: /var/lib/jenkins/jobs/New job/builds/4/cloverphp/clover.xml
Could not find 'build/coverage/build/logs/clover.xml'.  Did you generate the XML report for Clover?
[CRAP4J] Collecting Crap4J analysis files...
[CRAP4J] Searching for report files within build/logs/crap4j.xml
[CRAP4J] Using the new FileSetBuilder
[CRAP4J] No crap4j report files were found. Configuration error?
Build step 'Report Crap' changed build result to FAILURE
Build step 'Report Crap' marked build as failure
[htmlpublisher] Archiving HTML reports...
[htmlpublisher] Archiving at BUILD level /var/lib/jenkins/jobs/New job/workspace/build/api to /var/lib/jenkins/jobs/New job/builds/4/htmlreports/API_Documentation
[xUnit] [INFO] - Starting to record.
[xUnit] [INFO] - Processing PHPUnit-3.x (default)
[xUnit] [INFO] - [PHPUnit-3.x (default)] - 1 test report file(s) were found with the pattern 'build/logs/junit.xml' relative to '/var/lib/jenkins/jobs/New job/workspace' for the testing framework 'PHPUnit-3.x (default)'.
[xUnit] [INFO] - Check 'Failed Tests' threshold.
[xUnit] [INFO] - Check 'Skipped Tests' threshold.
[xUnit] [INFO] - Setting the build status to FAILURE
[xUnit] [INFO] - Stopping recording.
[JDepend] JDepend plugin is ready
[JDepend] Found 188 classes in 1 packages
Finished: FAILURE

Jenkins log:

мар 17, 2016 11:24:46 AM hudson.model.Run execute
INFO: New job #4 main build action completed: SUCCESS
мар 17, 2016 11:24:47 AM org.jenkinsci.plugins.xunit.service.XUnitService infoSystemLogger
INFO: [xUnit] - [PHPUnit-3.x (default)] - 1 test report file(s) were found with the pattern 'build/logs/junit.xml' relative to '/var/lib/jenkins/jobs/New job/workspace' for the testing framework 'PHPUnit-3.x (default)'.
[warn] [XHTML Sink] Modified invalid anchor name: 'SebastianBergmann\Money' to 'SebastianBergmannMoney'

What I do wrong?

UPDATE: The problem has been that I did not have "php5-xdebug"

Upvotes: 3

Views: 6257

Answers (3)

Fadel
Fadel

Reputation: 711

move your phpdox.xml to the project root

Upvotes: 0

VLL
VLL

Reputation: 10185

There are two separate issues in the message.

Clover results were not found:

Publishing Clover coverage report...
Clover xml file does not exist in: /var/lib/jenkins/jobs/New job/workspace called: build/logs/clover.xml and will not be copied to: /var/lib/jenkins/jobs/New job/builds/4/cloverphp/clover.xml
Could not find 'build/coverage/build/logs/clover.xml'.  Did you generate the XML report for Clover?

Crap results were not found:

[CRAP4J] No crap4j report files were found. Configuration error?
Build step 'Report Crap' changed build result to FAILURE
Build step 'Report Crap' marked build as failure

I cannot tell you what exactly you are doing wrong, but checking your configuration could help you identify the cause.

Upvotes: 1

Bruno Lavit
Bruno Lavit

Reputation: 10382

Your job is marked as failure because of this build step:

[CRAP4J] No crap4j report files were found. Configuration error?
Build step 'Report Crap' changed build result to FAILURE
Build step 'Report Crap' marked build as failure

You have to investigate why this Crap report is missing.

Upvotes: 1

Related Questions