I am having trouble getting a bitbucket pipeline to run correctly, it keeps throwing a permission denied error and I can't for the life of me see why?
This is my composer file:
{
"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.*"
}
}
This is my bitbucket pipeline config file:
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
The output is:
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
Is there some trick I am missing? Any help would be greatly appreciated!