我在正确运行的Bitbucket管道上遇到了麻烦,它一直在丢弃许可,而我不能为自己的终身看吗?
这是我的作曲家文件:
{
"name": "pswebsolutionsltd/psadoptables",
"description": "Framework for Building Adoptable Sites",
"version": "0.0.1",
"type": "project",
"homepage": "https://www.pswebsolutions.co.uk/",
"authors": [
{
"name": "Paul Cook",
"email": "paul.cook@pswebsolutions.co.uk",
"homepage": "https://www.pswebsolutions.co.uk/"
}
],
"support": {
"issues": "https://bitbucket.org/pswebsolutionsltd/psadoptables/issues?status=new&status=open",
"wiki": "https://bitbucket.org/pswebsolutionsltd/psadoptables/wiki/",
"source": "https://bitbucket.org/pswebsolutionsltd/psadoptables/src"
},
"scripts": {
"test": [
"@clean",
"@load",
"@clearCache",
"@phpCS",
"@phpUnit",
"@phpDoc"
],
"clean": "composer clear-cache",
"load": "composer dump-autoload -o",
"clearCache": "rm -rf cache && mkdir cache",
"phpUnit": "phpunit --configuration phpunit.xml tests",
"phpDoc": "phpdoc",
"phpCS": "phpcs --config-set default_standard PSR2 phpcs src/ --extensions=php && phpcs tests/ --extensions=php",
"phpCBF": "phpcbf ./ --extensions=php"
},
"autoload": {
"psr-4": {
"AdoptableFramework\": "src/",
"AdoptableFramework\Tests\": "tests/",
"AdoptableFramework\Extend\": "src/extend/"
}
},
"require": {
"matthiasmullie/minify": "^1.3"
},
"require-dev": {
"phpunit/phpunit": "5.7",
"phpdocumentor/phpdocumentor": "2.*",
"squizlabs/php_codesniffer": "3.*"
}
}
这是我的Bitbucket管道配置文件:
P S Adoptable build configuration for PHP.
pipelines:
default:
- step:
name: php56-mysql57
image: php:5.6-apache
script:
# update apt
- apt-get update && apt-get install -y unzip
# install mysqli
- apt-get install -y mysql-client
- docker-php-ext-install mysqli
# install and configure composer
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
- composer install --no-interaction --no-progress --prefer-dist
- composer test
services:
- mysql57
definitions:
services:
mysql57:
image: mysql:5.7
environment:
MYSQL_DATABASE: psadoptables
MYSQL_ROOT_PASSWORD: root
输出为:
sh: 1: phpcs: Permission denied
Script phpcs --config-set default_standard PSR2 phpcs src/ --extensions=php && phpcs tests/ --extensions=php handling the phpCS event returned with error code 126
我缺少一些技巧吗?任何帮助将不胜感激!
我会怀疑作曲家在/usr/local/bin或目录本身中的许可。对于调试,您可以在Pipeline配置中添加" LS -L/usr/local/bin/composer",然后在安装作曲家之后。