Go to file
2025-04-17 20:53:18 +02:00
Classes [TASK] Reorganize and cleanup 2025-04-17 20:53:18 +02:00
.editorconfig [TASK] Add base files 2024-12-14 14:10:55 +01:00
.gitignore [TASK] Add base files 2024-12-14 14:10:55 +01:00
.gitlab-ci.yml [TASK] Add base files 2024-12-14 14:10:55 +01:00
alias.sh [TASK] Add base files 2024-12-14 14:10:55 +01:00
composer.json [TASK] Update deployer to 7.x 2025-04-17 07:38:04 +02:00
deploy.php [TASK] Update deployer to 7.x 2025-04-17 07:38:04 +02:00
README.md [TASK] Add base files 2024-12-14 14:10:55 +01:00

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'