douxuanpa8298 2016-01-28 05:31
浏览 51
已采纳

在PHPCI中构建需要永远

I'm setting up Continues Integration and I'm wondering if everything should take so damn long. My build is running for over a day in the mean time and still it's not finished.

It is a normal Laravel app with around 20 controllers, so a little time is granted, but over a day?

My config is fairly simple in my opinion:

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"

No errors, only the (by now) pesky status "Pending"

When I check the logs I get this error:

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"

I did composer update / install and I also added the following rule to the nginx configuration:

fastcgi_param SCRIPT_NAME index.php;

My question is, is this normal? Is my config good? Am I forgetting something?

展开全部

  • 写回答

1条回答 默认 最新

  • dongra1984 2016-01-28 08:02
    关注

    You've not set up the build runner when you set up PHPCI. The web interface merely creates the build and displays the results, you need to run the command line tool to run the builds.

    There are three ways to set this up:

    1. (New in 1.7 beta) PHPCI Worker w/ beanstalkd.

      • Install beanstalkd
      • Use supervisord (or similar) to run /path/to/phpci/console phpci:worker
    2. (Recommended for 1.6 and below) PHPCI Daemon: https://www.phptesting.org/wiki/Run-Builds-Using-a-Daemon

    3. (Fallback option) Cron: https://www.phptesting.org/wiki/Run-Builds-Using-Cron

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
编辑
预览

报告相同问题?

手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部