| Classes | ||
| .editorconfig | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| alias.sh | ||
| composer.json | ||
| deploy.php | ||
| README.md | ||
To install add Build/composer.json to the project
{
"name": "cp/build",
"description": "Project deployment with support for deployphp",
"repositories": [
{
"type": "git",
"url": "https://gitlab.cp-compartner.de/cpcompartner/build-config.git"
}
],
"require": {
"cp/build-config": "^1.7.3"
},
"scripts": {
"staging": "dep -vv --file=vendor/cp/build-config/deploy.php deploy staging --branch",
"production": "dep --file=vendor/cp/build-config/deploy.php deploy production --tag",
"phpcs-fixer": "php-cs-fixer fix --config=vendor/cp/build-config/php_cs.php",
"phpstan": "phpstan analyse --configuration=vendor/cp/build-config/phpstan.neon",
"rector": "rector process --config=vendor/cp/build-config/rector.php",
"php72-lint": "find ../packages ../private/typo3conf -name '*.php' -exec php7.2 -l {} 1> /dev/null \\;",
"php74-lint": "find ../packages ../private/typo3conf -name '*.php' -exec php7.4 -l {} 1> /dev/null \\;"
}
}
Usage per composer
Install it with:
./composer update
Deploy branch develop to staging
./composer staging develop
Deploy tag 1.0.0 to production
./composer production 1.0.0
PHPCS fixer usage:
./composer phpcs-fixer ../package/cp_sitepackage
PHPStan usage:
./composer phpstan ../package/cp_sitepackage
TYPO3 Rector usage:
./composer rector ../package/cp_sitepackage
Overriding default values per host in hosts.yaml
.base: &base
local: true
alias: '{{CI_HOST}}'
deploy_path: '{{CI_PROJECT_DIR}}/cache/{{ENVIRONMENT_NAME}}'
composer_options: '{{composer_action}} --verbose --prefer-dist --no-progress --no-interaction --no-dev --optimize-autoloader --no-suggest --ignore-platform-reqs'
prepare_dirs:
- .dep
- releases
- shared/fileadmin
shared_dirs_private:
- fileadmin
writable_dirs:
- private/typo3temp
- var
writable_files:
- private/typo3conf/PackageStates.php
rsync:
exclude:
- '-,p private/typo3temp/var/Cache'