Jenkins PHP任务失败

3
几天来,我一直在处理Jenkins和产生的错误。目前为止,事情已经有所稳定,但是我不明白,因为构建失败了。这就是我赚的,而我无法弄清楚我错在哪里。
请考虑以下两个主题:Jenkins PHP Job FailingJenkins-Job fails,但是我找不到解决我的问题的方法。
[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

请分享您的 build.xml 或 phpunit.xml 文件。 - jackinos
2个回答

2
请检查您的构建文件。
您的构建配置文件无法创建“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>

-1

有什么不清楚的吗?

[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文件,或者你没有指定这些文件的位置。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接