V
V
Vladislav2016-03-17 10:43:22
PHP
Vladislav, 2016-03-17 10:43:22

Why does a build in jenkins succeed but fail?

Set up jenkins according to the jenkins-php.org template . I start the assembly, as a result I get BUILD SUCCESSFUL and Finished: FAILURE. I use the https://github.com/sebastianbergmann/money project as a test repository .

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 cl</blockquote>asses in 1 packages
Finished: FAILURE

Jenkins logs:
мар 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 could be the problem?
UPDATE: It was necessary to install xdebug.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maronus, 2016-03-17
@Maronus

[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

Actually the culprit is indicated in the log. Apparently Crap4j cannot find the files to report and throws an error.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question