在PHPCI中构建需要永远

时间:2016-01-28 13:31:25

标签: php continuous-integration php-ci

我正在设置继续整合,我想知道是否一切都应该花这么长时间。 我的版本在同一时间内运行了一天以上,但仍然没有完成。

这是一个普通的Laravel应用程序,有大约20个控制器,所以有一点时间,但是一天之后?

我认为我的配置相当简单:

build_settings:
ignore:
    - "vendor"
setup:
composer:
    action: "install"

test:
php_mess_detector:
    allow_failures: true
php_code_sniffer:
    standard: "PSR2"
php_cpd:
    allow_failures: true
php_docblock_checker:
    allowed_warnings: 10
    skip_classes: true
php_loc:
    directory: "src"

没有错误,只有(到现在)讨厌的状态"待定"

当我检查日志时,我收到此错误:

  

2016/01/28 08:01:32 [错误] 6702#0:* 4在stderr中发送FastCGI:" PHP消息:PHP致命错误:Class' PHPCI \ Controller'在第93行和第34行的/var/www/vendor/block8/b8framework/b8/Application.php中找不到;从上游读取响应头时,客户端:someipaddress,server:green.somedomain.com,request:" GET /assets/js/plugins/datepicker/locales/bootstrap-datepicker.en.js HTTP / 1.1&#34 ;,上游:" fastcgi:// unix:/var/run/php5-fpm.sock:",主持人:" green.somedomain.com",推荐人:&#34 ; http://green.somedomain.com/build/view/5"

我做了作曲家更新/安装,我还在nginx配置中添加了以下规则:

  

fastcgi_param SCRIPT_NAME index.php;

我的问题是,这是正常的吗?我的配置好吗?我忘记了什么吗?

1 个答案:

答案 0 :(得分:4)

设置PHPCI时,您没有设置构建运行器。 Web界面仅创建构建并显示结果,您需要运行命令行工具来运行构建。

有三种方法可以设置它:

  1. (1.7测试版新增)PHPCI Worker w / beanstalkd。

    • 安装beanstalkd
    • 使用supervisord(或类似)运行/path/to/phpci/console phpci:worker
  2. (推荐1.6及以下)PHPCI守护进程:https://www.phptesting.org/wiki/Run-Builds-Using-a-Daemon

  3. (后备选项)Cron:https://www.phptesting.org/wiki/Run-Builds-Using-Cron