在 PHPCI 中构建需要永远

Build in PHPCI takes forever

我正在设置 Continues Integration,我想知道是否一切都需要这么长时间。 我的构建已经 运行 同时超过一天了,但仍未完成。

这是一个普通的 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"

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

当我检查日志时,我得到这个错误:

2016/01/28 08:01:32 [error] 6702#0: *4 FastCGI sent in stderr: "PHP message: PHP Fatal error: Class 'PHPCI\Controller' not found in /var/www/vendor/block8/b8framework/b8/Application.php on line 93" while reading response header from upstream, client: someipaddress, server: green.somedomain.com, request: "GET /assets/js/plugins/datepicker/locales/bootstrap-datepicker.en.js HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "green.somedomain.com", referrer: "http://green.somedomain.com/build/view/5"

我做了 composer update / install,我还在 nginx 配置中添加了以下规则:

fastcgi_param SCRIPT_NAME index.php;

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

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

可通过三种方式进行设置:

  1. (1.7 测试版中的新功能)带有 beanstalkd 的 PHPCI Worker。

    • 安装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