* Use cp instead of rsync to copy directories
Since rsync is not installed on every host it's better to use standard tools.
Previosly rsync was introduced ( #1072 ) to enable copying of subdirectories, but
this is doable with cp as well.
* Throw an exception if copy_dirs entries end with a slash
* Fix to strip last directory name from the destination folder
* Update CHANGELOG.md
Co-authored-by: Anton Medvedev <anton@medv.io>
* Use PHP biuld in funtion to detect scheme, hostname and port in repo url. refs #2667
* Updated changelog
* Add missing reference to changelog
* Unrelated issue, in order to make phpstan happy.
Use an environment variable or setting to override the default deployer root
directory used for the runLocally() default cwd configuration.
Resolves#2628
* First activate plugins/themes THEN build them
Currently the first step is to run bin/build.sh which builds all *ACTIVATED* themes. After this step we activate all composer-registered plugins (which in my case are all the themes) and THEN compile them. For new themes that means, that they are *NOT* build because they are activated AFTER building.
This PR fixes that and activated first and builds second.
* update changelog
* Fix symfony cache:clear running twice on deployment
Any standard symfony app is running cache:clear on composer install ever since.
I.e. in composer.json
```
"scripts": {
"auto-scripts": {
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd"
},
"post-install-cmd": [
"@auto-scripts"
],
"post-update-cmd": [
"@auto-scripts"
]
},
```
This prevents cache clearing being run twice for no reason.
* regenerate doc
* Cachetool improvements
- remove outdated cachetool apc command (not apcu) that does not exist since 4.x,
- document web adapter example
- use release_or_current_path to be able to execute tasks outside of deployment
* regenerate doc
The E2E docker-compose stack has been modified to include code
coverage for all scripts that are kept in /project and are not
in the exclusion list.
The start command for `deployer` container has been replaced
with a `start-e2e-test.sh` script, which will execute E2E tests,
generate a Clover report and then return the exit code of E2E test
process to make sure that CI is aware of the test result.
Whole idea for collecting E2E coverage has been inspired by the
[this][1] article. All of scripts in `deployer` container will
now start with additional wrapper-like PHP code, which checks
if the `PHP_CCOV_START_FILE` variable is present. If not,
then nothing happens, but if the variable points to a PHP file,
then that file is being included.
The `docker-compose.yml` file has `PHP_CCOV_START_FILE` configured
to point to a file, which sets up code coverage, that starts counting
which instructions in `/project` directory have been called. Once
`php` interpreter starts shutting down, the coverage report is being
dumped into temporary files.
Once all tests have been processed, a script for merging partial
coverage reports is executed and finally a Clover code coverage file
is stored in the path defined in the `PHP_CCOV_OUTPUT_FILE` env var.
[1]: https://tarunlalwani.com/post/php-code-coverage-web-selenium/