【发布时间】:2014-12-07 01:06:20
【问题描述】:
我想设置 Bamboo CI Server。我创建了两个阶段:
- 第 1 阶段:带有代码签出的“代码签出”。
- 第 2 阶段:“PHPunit”,通过 phpunit 进行测试。
第 1 阶段还可以,但在第 2 阶段出现错误。在构建日志中我有:
Starting task 'PHPUnit Testing' of type 'com.atlassian.bamboo.plugins.php:task.builder.phpunit'
12-paź-2014 10:45:49
Beginning to execute external process for build 'CCP - CI - Unit Testing Build - Default Job #4 (CCPCI-UTB-JOB1-4)'
... running command line:
/usr/local/bin/phpunit --log-junit test-reports/phpunit.xml --coverage-html test-reports/coverage/html --bootstrap /var/www/html/ccp/core/tests/bootstrap.php --no-configuration /var/www/html/ccp/core/tests
... in: /home/bamboo/bamboo_home/xml-data/build-dir/CCPCI-UTB-JOB1
12-paź-2014 10:45:49 X-Powered-By: PHP/5.5.11
12-paź-2014 10:45:49 Content-type: text/html
12-paź-2014 10:45:49
12-paź-2014 10:45:49 Failing task since text 'OK' was not found in last 250 log entries
12-paź-2014 10:45:49 Parsing test results...
12-paź-2014 10:45:49 Finished task 'PHPUnit Testing'
如果在服务器终端我执行 phpunit 命令 (/usr/local/bin/phpunit --log-junit test-reports/phpunit.xml --coverage-html test-reports/coverage/html --bootstrap /var/ www/html/ccp/core/tests/bootstrap.php --no-configuration /var/www/html/ccp/core/tests),一切正常(有OK响应)。
这是怎么回事?
在构建的概览屏幕上有两个错误:
(Job results summary) No failed tests found, a possible compilation error occurred.(Error summary) Could not find test result reports in the /home/bamboo/bamboo_home/xml-data/build-dir/CCPCI-UTB-JOB1 directory.
如果有任何帮助,我将不胜感激。
【问题讨论】:
-
我已经解决了我的问题。我必须将环境变量 (JVM_SUPPORT_RECOMMENDED_ARGS="-Datlassian.bamboo.builder.successMarker='OK'") 添加到文件 setenv.sh。一切都很好。
-
使用此信息(以及漂亮的格式)回答您自己的问题,并接受您自己的回答以将问题标记为已解决。它可能会让你等到明天才真正接受它。
-
这个问题仍然列为未解决。我们有机会解决这个问题吗?万一Will的建议太麻烦了:现在就像点击一个按钮一样简单......
标签: php continuous-integration phpunit bamboo