douxuanpa8298 2016-01-28 13: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 16: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

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

报告相同问题?

悬赏问题

  • ¥20 测距传感器数据手册i2c
  • ¥15 RPA正常跑,cmd输入cookies跑不出来
  • ¥15 求帮我调试一下freefem代码
  • ¥15 matlab代码解决,怎么运行
  • ¥15 R语言Rstudio突然无法启动
  • ¥15 关于#matlab#的问题:提取2个图像的变量作为另外一个图像像元的移动量,计算新的位置创建新的图像并提取第二个图像的变量到新的图像
  • ¥15 改算法,照着压缩包里边,参考其他代码封装的格式 写到main函数里
  • ¥15 用windows做服务的同志有吗
  • ¥60 求一个简单的网页(标签-安全|关键词-上传)
  • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法