366 Commits

Author SHA1 Message Date
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
Justinas Urbanavicius
a6edb7f977
fixed issue #2209 (#2211)
* fixed issue #2209

Copy shared files and folder should be verbose only when deployer is run with Very verbose output

* updated CHANGELOG.md

* changed to -vvv

* changes sprintf to interpolation
2020-10-22 13:56:20 +02:00
Tobias van Beek
c7417e4bcc
Typehint functions file (#2210)
* Add typehints for the functions.php file

* Update the changelog

* add src/functions.php to the phpcs config

* Fix the phpcs errors
- add missing typehints
- remove not needed doc block comments about params and return values and empty lines
2020-10-22 13:54:24 +02:00
Sacharski Bartłomiej
67ed1a800b
[#2197] Created E2E testing environment (#2198)
* [#2197] Created E2E testing environment

Created docker-based end-to-end testing environment, which allows
for testing more complex scenarios.

Additionally added FunctionE2ETest class that contains test scenario
for `run` function with placeholders.

Closes #2197

* [#2197] Moved docker to test dir & separated e2e tests from unit-tests

The docker directory has been moved into test/ directory.
Additionally the e2e tests have been separated from the unit-test
files:
  * AbstractE2ETest class is directly inheriting from TestCase,
    dropping relation to the AbstractTest
  * Separate bootstrap.php file for e2e test was created
  * Separate phpunit-e2e.xml.dist file was created to configure
    PHPUnit for just the e2e tests
  * deployer docker service now runs only e2e tests by default

* [#2197] Added E2E tests to GH actions

Added E2E tests steps to GH actions:
* building the docker-compose stack (building images)
* starting the stack to run the tests

If E2E tests fail, then docker-compose up will end with non-zero
exit code, thus the workflow will be marked as failed.

* [#2197] Fixed no output when using run() with sudo

Fixed a discrepancy in the `run()` function, where there would be
no output when the command was being executed with a sudo.

* [#2197] Added testcases for running commands with sudo

Added two testcases for e2e tests, that verify:
* that sudo command can be ran with password provided interactively
* that sudo command can be ran with password passed via argument

To allow for these tests to happen, the Dockerfile for server
service had to be modified - the deployer user will require a
password, when running command with sudo.

* [#2197] Added Laravel-boilerplate deploy E2E test

Added a very simple E2E test that checks whether the Laravel-boilerplate
deploys successfully to the testing server.

The testing scenario will deploy the app, copy sample .env file,
generate the app key and finally try to get the main page contents
to verify that the expected string is visible in the page source.

* [#2197] Moved E2E tests to separate job

Moved E2E tests to separate job and added docker-compose cache
to slightly improve stack build times.

* [#2197] Using deployphp test-laravel repo for E2E tests

Updated the laravel-boilerplate deploy config to use the repository
that belongs to deployphp organization.

Co-authored-by: Bartlomiej Sacharski <beton@cementowina.org>
2020-10-19 23:38:15 +03:00
Anton Medvedev
9fdade7b90 Update changelog 2020-10-17 11:13:08 +02:00
bonswouar
f7fb577b34
[#2207] Symfony change dir to execute DoctrineMigrations (#2208)
Co-authored-by: bonswouar <contact@florianmessmer.com>
2020-10-17 11:07:22 +03:00
helsner
f251352fa2
feat!: adapt chat notify favicon to handle custom links (#2203)
* feat!: adapt chat notify favicon to handle custom links

* style: add missing punctuation
2020-10-14 17:33:18 +02:00
Anton Medvedev
91c1d5fbec Docs updates 2020-10-11 01:52:36 +02:00
Anton Medvedev
8e72449246 Add push task 2020-10-11 00:08:50 +02:00
Sacharski Bartłomiej
357cfc04c8
[#2192] Support for placeholders in run and runLocally (#2193)
* [#2192] Support for placeholders in run and runLocally

Added support for placeholder in the `run` and `runLocally` functions.
By passing the `vars` key with an associative array to the second
argument of `run` and `runLocally`, it is possible to use placeholders
in the command, that will be used directly in the executed command.

The placeholders should be wrapped in the command with `%NAME%`, for
instance `%foo%`. The `vars` array could be `[ 'foo' => '{{bar}}']`.

Sample:

```php
runLocally("echo '%foo%'", ['vars' => ['foo' => '{{bar}}']]);
```

will output:

```plain
{{bar}}
```

* [#2192] Added missing implementation for placeholders in run()

Added missing implementation for placeholders support int the `run()`
function as it was missing in previous commit.

Co-authored-by: Bartlomiej Sacharski <beton@cementowina.org>
2020-10-10 00:16:55 +03:00
Anton Medvedev
f429c750bc Keep release on rollback and mark it as bad 2020-10-09 23:11:30 +02:00
Hardy Johnson
68d9cbd4e1
Cachetool contrib recipe, add stat:clear command. (#2103)
Co-authored-by: Anton Medvedev <anton@medv.io>
2020-10-08 03:17:56 +03:00
Matt Stein
2098c41fe5
Support custom rsync flags. (#2115)
* Support custom rsync flags.

* Update changelog.

Co-authored-by: Anton Medvedev <anton@medv.io>
2020-10-08 02:55:54 +03:00
Anton Medvedev
34e6c5f00f Fix CHANGELOG.md style 2020-10-08 01:40:51 +02:00
Markus Staab
db1b005ef1
fixed min-php version check (#2102)
* fixed min-php version check

* Update CHANGELOG.md

* more generic wording

* Update dep

Co-authored-by: Anton Medvedev <anton@medv.io>
2020-10-08 02:40:08 +03:00
Sacharski Bartłomiej
89bde7059c
[issue-2187] Type declarations for src/Configuration (#2188)
Refactored the code in `src/Configuration` to include type declarations
for method arguments and returned values.

To make it easier to track what's left to do and to have a tool that
prevents "regressions" in the future, PHP_CodeSniffer and Slevomat
Coding Standard have been added.

Next, a `phpcs.xml.dist` file has been created and configured to
enforce type hints for methods. For the time being, only files in
the src/Configuration directory are now being watched.

To make it simpler to execute the checks, `lint` script has been
added to `composer.json` to allow running checks with `composer lint`.
2020-10-07 20:48:33 +02:00
Sacharski Bartłomiej
9ccf96795e
[issue-2178] updated CHANGELOG.md (#2186)
Added missing entry about change introduced as a part of fix for
the issue #2178.
2020-10-04 03:16:17 +03:00
Sacharski Bartłomiej
5808b2daaa
[issue-2181] Fix unit tests on non-master branches (#2182)
The unit tests would fail, when started on a non-master branch.
This was happening because the test repository has been initialized
with git default branch, whereas deploy configuration expects to
work with current git branch.

This has been fixed by adding `git checkout -B BRANCH_NAME`, right after
test repo initialization to the DeployTest setup procedure, to make sure
that the test repositoryis always in sync repo-wise with the Deployer
repository.

Fixes #2181
2020-10-03 10:41:07 +02:00