几天与詹金斯和错误搏斗,这给了我。现在我已经稳定了一些,但我无法理解,因为构建失败了。这就是我赚的钱,我不知道我错在哪里。
请考虑以下两个主题:詹金斯 PHP 作业失败 ,詹金斯-乔布斯失败
但我找不到解决问题的方法。
[workspace] $ ant
Buildfile: /var/lib/jenkins/jobs/MTR-CMS/workspace/build.xml
clean:
[delete] Deleting directory /var/lib/jenkins/jobs/MTR-CMS/workspace/build/coverage
[delete] Deleting directory /var/lib/jenkins/jobs/MTR-CMS/workspace/build/logs
prepare:
[mkdir] Created dir: /var/lib/jenkins/jobs/MTR-CMS/workspace/build/coverage
[mkdir] Created dir: /var/lib/jenkins/jobs/MTR-CMS/workspace/build/logs
phpunit:
[exec] PHPUnit 4.4.0 by Sebastian Bergmann.
[exec]
[exec] Configuration read from /var/lib/jenkins/jobs/MTR-CMS/workspace/phpunit.xml
[exec]
[exec] .
[exec]
[exec] Time: 154 ms, Memory: 10.00Mb
[exec]
[exec] OK (1 test, 1 assertion)
[exec]
[exec] Generating code coverage report in Clover XML format ... done
[exec]
[exec] Generating code coverage report in HTML format ... done
build:
BUILD SUCCESSFUL
Total time: 1 second
Publishing Clover coverage report...
Publishing Clover HTML report...
Publishing Clover XML report...
Publishing Clover coverage results...
[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
[xUnit] [INFO] - Starting to record.
[xUnit] [INFO] - Processing PHPUnit-3.x (default)
[xUnit] [INFO] - [PHPUnit-3.x (default)] - No test report file(s) were found with the pattern 'build/logs/junit.xml' relative to '/var/lib/jenkins/jobs/MTR-CMS/workspace' for the testing framework 'PHPUnit-3.x (default)'. Did you enter a pattern relative to the correct directory? Did you generate the result report(s) for 'PHPUnit-3.x (default)'?
[xUnit] [ERROR] - No test reports found for the metric 'PHPUnit' with the resolved pattern 'build/logs/junit.xml'. Configuration error?.
[xUnit] [INFO] - Failing BUILD.
[xUnit] [INFO] - There are errors when processing test results.
[xUnit] [INFO] - Skipping tests recording.
[xUnit] [INFO] - Stop build.
Finished: FAILURE
请检查您的构建文件
您的构建配置文件无法创建"Junit.xml"文件
或
检查 phpunit.xml 文件
<logging>
<log type="coverage-html" target="coverage"/>
<log type="coverage-clover" target="clover/clover.xml"/>
<log type="coverage-crap4j" target="logs/crap4j.xml"/>
<log type="junit" target="logs/junit.xml" logIncompleteSkipped="false"/>
</logging>
什么不清楚?
[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`
您的 Crap4J 插件正在将构建结果设置为失败。
它还说它找不到报告文件,因此您的构建没有产生插件所需的.xml
,或者您没有指定这些文件的位置