Gitlab-CI PHP可执行文件返回错误代码255

我最近在自己托pipe的GitLab CE实例中设置了GitLab-CI。 我为一个特定的项目和一个共享的跑步者创build了一名跑步者。

我的/etc/gitlab-runner/config.toml如下:

 concurrent = 1 check_interval = 0 [[runners]] name = "project runner" url = "https://gitlab.domain.com/ci" token = "SECRET" executor = "docker" [runners.docker] tls_verify = false image = "geertw/docker-php-ci:7.0-no-xdebug" privileged = false disable_cache = false volumes = ["/cache"] shm_size = 0 [runners.cache] [[runners]] name = "shared runner" url = "https://gitlab.domain.com" token = "SECRET" executor = "docker" [runners.docker] tls_verify = false image = "geertw/docker-php-ci:7.0-no-xdebug" privileged = false disable_cache = false volumes = ["/cache"] shm_size = 0 [runners.cache] 

然后我将自定义脚本添加到我的composer.json文件中:

 ... "scripts": { "build": [ "@composer install --no-progress --no-interaction --no-suggest", "@lint" ], "lint": "php -d display_errors -d display_startup_errors ./vendor/bin/parallel-lint --exclude vendor ." } 

脚本是我的.gitlab-ci.yml文件的一部分:

 before_script: - php -v services: - mysql:latest variables: MYSQL_DATABASE: "database" MYSQL_ROOT_PASSWORD: "password" build:7.0: image: geertw/docker-php-ci:7.0 script: - composer build - php vendor/bin/phpunit --coverage-text --colors=never build:7.1: image: geertw/docker-php-ci:7.1-no-xdebug script: - composer build cache: paths: - vendor/ 

当我在GitLab中执行pipe道时,我收到一个错误:

 > php -d display_errors -d display_startup_errors ./vendor/bin/parallel-lint --exclude vendor . Script php -d display_errors -d display_startup_errors ./vendor/bin/parallel-lint --exclude vendor . handling the lint event returned with error code 255 ERROR: Job failed: exit code 1 

现在,当我在本地运行composer lint ,它按预期工作。 我也尝试过注释掉,并且我收到了PHPUnit(build:7.0 in .gitlab-ci.yml)中的错误。 由于debugging的原因,我添加了php -d来显示错误,但没有显示。

另一个(专用)pipe道按照预期为具有完全相同的.gitlab-ci.yml文件的较小项目工作。 我也尝试从一个转轮转换到另一个,但它不工作。

由于我是一般的docker和CI的新手,对于如何正确debugging这种情况已经有一些了解,可能会以某种方式增加php memory_limit或将错误输出到stderr。

有任何想法吗?

原来有一个自动加载器用@call执行ext-mysqli函数。 该应用程序是一团糟。