383 Commits

Author SHA1 Message Date
Goran Jurić
6b2a81950f
Use cp instead of rsync to copy directories (#2659)
* 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>
2021-09-23 19:03:17 +02:00
Sander Toonen
1c8e23f00a
Use build in php-function to detect scheme, hostname and port in repo url (#2668)
* 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.
2021-09-23 18:58:57 +02:00
Dominik
d8212f7b2e
add webpack-encore recipe (#2629)
* add webpack-encore recipe

* add changelog

Co-authored-by: Fabian Blechschmidt <github@fabian-blechschmidt.de>
2021-08-23 18:26:48 +02:00
Alex Mayer
4bd32d8ead
Add Port When Running SSH Keyscan (#2551)
Fixes #2549

Co-authored-by: Fabian Blechschmidt <github@fabian-blechschmidt.de> (fixed conflicts, took to long to merge 🤷)
2021-08-20 11:17:01 +02:00
Jonas Siewertsen
14f20257be
Add statamic recipe (#2627)
* Add a statamic recipe
* Update CHANGELOG.md
* Add doc recipe for Statamic
2021-08-20 11:10:46 +02:00
David
d5b8ee78a6
use release_or_current_path instead of release_path for sw:plugin:upgrade:all in shopware recipe (#2610) 2021-07-27 12:09:26 +02:00
Fabian Blechschmidt
515eac3c0a
DRAFT: First activate plugins/themes THEN build them (#2607)
* 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
2021-07-22 15:40:40 +02:00
Markus Staab
2a5d5c2032
Support passing null as default in get() (#2560)
* Support passing `null` as $default in get()

* Update CHANGELOG.md

Co-authored-by: Markus Staab <m.staab@complex-it.de>
2021-06-17 07:30:44 +03:00
Sacharski Bartłomiej
d3b6eaf9fe
Added support for code coverage in E2E tests (#2533)
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/
2021-05-02 15:15:19 +02:00
Fabian Blechschmidt
f77186eb7b
Fixes #2525 (#2526) 2021-04-27 07:18:37 +02:00
Jeffrey Cafferata
a38a01615e
Update GIT remote origin (#2520)
Changed the way the GIT remote URL is fetched from the config.
2021-04-22 19:14:09 +02:00
Sacharski Bartłomiej
165ffa119a
Implemented ConsoleApplicationTester for isolated E2E tests (#2513)
Added a new class ConsoleApplicationTester, which during E2E tests
will create a separate isolated process for the Deployer to run in.

This class exposes methods for interacting with stdin and to grab
stdout, stderr and status code of finished process.
2021-04-17 23:11:26 +03:00
Loris Leiva
a26059d8a7
Fix regex that identifies "cd" commands in YAML scripts (#2510)
* Fix regex that identifies "cd" commands in YAML scripts

* Update CHANGELOG.md
2021-04-16 18:08:14 +03:00
Victor Paumier
63a0e667b7
add deploy:dump-env & remove .env.local.php from shared_files (#2507) 2021-04-16 12:13:58 +03:00
Fabian Blechschmidt
9ca1f05c59
#2503: TypeError, port is int on escapeshellarg (#2504)
* #2503: TypeError, port is int on escapeshellarg
2021-04-13 15:32:51 +02:00
Rick Schippers
b212b83e67
Bugfix shopware recipe plugin updates (#2414)
* removed incorrect duplicate version column

Output is as follows so:

$plugin,$label,$version,$upgrade,$author,$installed,$active,$upgradeable,

Shopware Plugin Service
=======================

 ------------------- --------------------------------------------------------- --------- ----------------- --------------------------- ----------- -------- -------------
  Plugin              Label                                                     Version   Upgrade version   Author                      Installed   Active   Upgradeable
 ------------------- --------------------------------------------------------- --------- ----------------- --------------------------- ----------- -------- -------------
  BuckarooPayments    Buckaroo Payment                                          1.1.1                       Buckaroo                    Yes         Yes      No
  DevTools            Additional tools to support your Shopware 6 development   0.2.0                       Maurits Meester             Yes         Yes      No

* Invoke sw:plugin:refresh inside sw:plugin:activate:all instead of incorrectly redefining it

* Upgrade all plugins that are upgradeable

* Changelog update

* Ran docgen

* Do NOT make upgrading all default

* Update doc

Co-authored-by: Fabian Blechschmidt <github@fabian-blechschmidt.de>
Co-authored-by: Fabian Blechschmidt <blechschmidt@fabian-blechschmidt.de>
2021-04-13 15:31:51 +02:00
Loris Leiva
a313326911
Fix ACL error message (#2501)
* Fix ACL error message

* Update CHANGELOG.md
2021-04-11 16:45:55 +02:00
Loris Leiva
378f7bfb10
Feature/add shared configs for common template only (#2491)
* Add shared configs for common template only

* Update CHANGELOG.md
2021-04-05 17:39:00 +02:00
Loris Leiva
4b1a5f7c57
Add artisan tasks that generate keys (#2490)
Co-Authored-By: Kundan <198781+kundancool@users.noreply.github.com>

Co-authored-by: Kundan <198781+kundancool@users.noreply.github.com>
Co-authored-by: Anton Medvedev <anton@medv.io>
2021-04-04 21:11:38 +02:00
Loris Leiva
219bf4e400
Update CHANGELOG.md (#2489) 2021-04-04 20:34:28 +02:00
Loris Leiva
b5721b8e83
Add php-fpm as a contrib recipe (#2487)
* Add php-fpm as a contrib recipe

* Update CHANGELOG.md

* Find the PHP-fpm version from the process
2021-04-04 12:59:36 +03:00
Loris Leiva
7627f9ba43
Add and use new release_or_current_path (#2486)
* Add release_or_current_path option

* Use new path in platform-specific recipes

* Update CHANGELOG.md
2021-04-03 15:05:45 +03:00
Fabian Blechschmidt
5d0893fa84
Normalize shopware recipe and add common.php (#2422)
* Normalize shopware recipe and add common.php
2021-03-08 13:53:51 +01:00
Jeffrey Cafferata
fa45c3276f
Boolean options should not go through the self::escape function. (#2402)
* Boolean options should not go through the `self::escape` function.

> Deployer\Support\Stringify::escape(): Argument #1 ($token) must be of type string, bool given

Fixes #2392.

* Update StringifyTest.php

* Update StringifyTest.php

Co-authored-by: Anton Medvedev <anton@medv.io>
2021-03-06 17:01:51 +01:00
Dennis Smink
27c7b6182c
Check (shared) file exists (#2393)
* Check (shared) file exists
* Update CHANGELOG.md
2021-03-05 12:51:00 +01:00
Fabian Blechschmidt
f5c9a92b1d
Feature/2423 shopware order modules (#2425)
* #2423 shopware: task sw:plugin:activate:all runs migration script in wrong order

- add dependency for polyfill (to use str_ends_with)
- marcj/topsort (for sorting the shopware modules)

* #2423 shopware: task sw:plugin:activate:all runs migration script in wrong order

- get the plugin list
- read the composer names and dependencies from composer.lock
- order by dependencies
- use sorted list for activation and migration

* #2423 shopware: task sw:plugin:activate:all runs migration script in wrong order

Update changelog

* #2423 shopware: task sw:plugin:activate:all runs migration script in wrong order

do not update doc, but remove require autoload.php
2021-02-23 08:50:46 +01:00
Martijn Gastkemper
5301d020b6
Add option to configure Slack channel (#2420)
* Add option to configure Slack channel
2021-02-22 14:14:59 +01:00
hieudt-2054
4f8ebd3494
Adding a Chatwork contrib recipe (#2367)
* Adding a Chatwork contrib recipe
* Add docgen
2021-02-22 14:04:03 +01:00
Rick Schippers
c714d10356
Shopware recipe - fix invalid parsing of plugin:list and invoke nested sw:plugin:refresh instead of redefining it (#2419)
* Removed incorrect duplicate version column

* Invoke nested task instead of incorrectly redefining it, so it actually runs.

* Changelog updated
2021-02-19 11:45:15 +01:00
Anton Medvedev
b3e0e03d99
Add named arguments to run and runLocally (#2353)
* Add named arguments to run and runLocally

* Update docs
2020-12-18 19:40:09 +03:00
Anton Medvedev
7283848cc6 Remove provision 2020-12-18 17:19:19 +01:00
Anton Medvedev
bc0a2beaae Fix CHANGELOG.md 2020-12-17 10:24:46 +01:00
Anton Medvedev
ecb76d11d3
Update CHANGELOG.md 2020-12-12 20:23:44 +01:00
Pascal Hubrecht
6d357e94b6
Safety to avoid modifying files outside deploy_path (#2284)
* Safety to avoid modifying files outside deploy_path

Using writable_dirs with writable_use_sudo can lead to a disaster on a server (example using /var/log instead of var/log as writable dir).

* Update writable.php

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update writable.php

* trailing slash

* docgen

* throw exception if absolute path in writable dirs
2020-12-12 20:21:48 +01:00
TrueXakeP
9a48ed0561
Fix impossibility to set empty password via askHiddenResponse() (#2319)
* Fix impossibility to set empty password via askHiddenResponse()

* Update CHANGELOG.md

* Update CHANGELOG.md
2020-12-03 10:24:46 +01:00
Anton Medvedev
6d486c84cd Update CHANGELOG.md 2020-11-10 23:38:14 +01:00
Unai Lopez
d9340bd7f6
Magento 2 Zero downtime deployment (#2262)
* Magento2: look for database migrations in order to get zero downtime deployments when changes are not needed
- also keep maintenance status active in case it was already previously activated

* Magento2: adjust shared dirs

* Magento2: dump autoload before setup di compile
- fix for magento 2.4 deployments https://github.com/magento/magento2/issues/23251

* Magento2: force static content deploy
- avoids deployment failure when magento production mode is not set

* Magento2: update change log

* Magento2: update recipe docs

* Revert "Magento2: force static content deploy"

This reverts commit 45de3337a5a3e524685c422be3fbc6957fe6b480.

* Magento2: detect configuration changes, launch config import

* Magento2: refactor recipe
- make all tasks compatible with any magento 2 version (skip command execution if still does not exist in certain version)
- remove duplicated check on maintenance status
- remove catch for processFailedException

Co-authored-by: Unai Lopez <unai.lopez@vdshop.es>
Co-authored-by: Peter Jaap Blaakmeer <peterjaap@blaakmeer.com>
2020-11-11 01:36:38 +03:00
Anton Medvedev
dae744a3b8 Update CHANGELOG.md 2020-11-10 23:35:56 +01:00
chriswalg
e463863459
Disabled support of cachetool below version 5. (#2280)
Fixed resolving of cachetool binary.
2020-11-10 00:19:00 +03:00
Anton Medvedev
fc06044cb6 Update CHANGELOG.md 2020-11-04 10:02:57 +01:00
Markus Staab
55177c5b18
Fix fail() signature (#2261)
* added phpstan callable types

* Update src/Task/Task.php

* regenerated docs

* Update CHANGELOG.md

* update phpstan

* Restore Collection.php

* Restore Master.php

* Restore helpers.php

* Restore Task.php

* Update functions.php

* Update functions.php

* Update CHANGELOG.md

* regenerate docs
2020-11-02 12:13:57 +01:00
Markus Staab
ba7b68b1e6
fixed typo in rabbit recipe (#2260)
* fixed bug in rabbit recipe

* Update CHANGELOG.md
2020-11-02 09:13:02 +01:00
Markus Staab
22e2e07f7a
fix bin/docgen on windows (#2254)
* fix bin/docgen on windows

* Update CHANGELOG.md

* fix ApiGen to handle windows newlines

* fix DocRecipe to handle windows newlines

* regenerate docs
2020-10-30 23:41:45 +01:00
Anton Medvedev
e1f55b8822 Update CHANGELOG.md 2020-10-26 22:29:09 +01:00
Markus Staab
c3bd2968cd
fix phpstan level 2 warnings (#2232)
* fix phpstan level 2 warnings

* Update CHANGELOG.md

* fix warnings

* fix types

* fix return type
2020-10-27 00:28:38 +03:00
Markus Staab
de0813a5f9
fix phpstan level 1 warnings (#2230)
* fix phpstan level 1 warnings

* Update CHANGELOG.md

* composer update
2020-10-26 17:36:53 +01:00
Anton Medvedev
f6750584a6 Update CHANGELOG.md 2020-10-25 15:07:39 +01:00
Anton Medvedev
936cfb0b69 Update CHANGELOG.md 2020-10-25 15:00:22 +01:00
Joey Kaan
ee3746690b
Add composer_version to choose which composer version to install (#2222)
Co-authored-by: Joey Kaan <joeyk@spotify.com>
2020-10-25 13:01:34 +01:00
Markus Staab
7bb908608f
Add phpstan (#2218)
* added phpstan static analysis via GitHub Actions

* Update CHANGELOG.md

* fix bad merge

* Update phpstan.yml

Co-authored-by: Anton Medvedev <anton@medv.io>
2020-10-25 11:21:07 +03:00