340 Commits

Author SHA1 Message Date
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
Sacharski Bartłomiej
514d997c15
[issue-2170] Use on(localhost(), ...) instead of runLocally in check_remote.php (#2175)
Reworked the `deploy:check_remote` step, to use the `on(localhost(), ...)`,
instead of relying on `runLocally`.

This has been changed, to make sure that the all functions that
are being executed and are related to "local" part of the logic,
are ran on the local host.

Previously in `runLocally(sprintf("%s ls-remote $opt $repository $ref", get('bin/git')));`
the `get('bin/git')` would've been executed on the remote host, which
could have resulted in an unexpected behaviour.

By closing all of the instructions, in the closure that is executed
by the `on()` function, we are sure that the context is set to the
right host.
2020-10-01 20:32:51 +03:00
demokn
a55c14f820
Fix: merge $options env to context env config, with overwriting (#2165) (#2166) 2020-09-23 21:01:29 +03:00
Andreas Möller
96c739bd5b
Enhancement: Add deploy:is-unlocked (#2152) 2020-09-03 16:17:52 +03:00
Brad Morrical
1d758b005f
Symfony 5 recipe (#2139) 2020-08-21 09:47:56 +03:00
Anton Medvedev
59c87c5885 wip 2020-07-11 01:24:18 +03:00
Savvas Radevic
d22a591bf8
Fix #2111 (#2112)
* Fix #2111 - normalize CRLF to LF new line endings

* Updated CHANGELOG.md #2111
2020-06-26 14:11:32 +03:00
Sergey Asafov
155e4b3095
Ispmanager recipe (#2093)
* Release candidate

* Add logs

* Release candidate

Co-authored-by: Evilcoder <i@evilcoder.me>
2020-06-24 21:49:22 +03:00
Sergey Asafov
39e5fbda61
Crontab recipe (#2089)
* First version

* Changelog

Co-authored-by: Evilcoder <i@evilcoder.me>
2020-06-13 12:58:22 +03:00
Anton Medvedev
29a643b623 v7 2020-05-16 18:02:17 +03:00
Anton Medvedev
4e243a64ed Release v6.8.0 2020-04-25 19:05:31 +03:00
M. Vugteveen
c948ea3e99
Added support for composer v2 installed.json format + composer.phar fix (#2031)
* fix composer v2 installed.json parsing

* add changelog

* only use bin/php on phar file

* update chagnelog

* Update dep
2020-04-24 15:53:08 +03:00
Anton Medvedev
7d090af22c
Revert "Output with parallel task execution was garbled (#2016)" (#2030)
This reverts commit e7cc411b235d7588f8b18fac402f87e655055d8c.
2020-04-22 23:07:14 +03:00
ebimmel
e7cc411b23
Output with parallel task execution was garbled (#2016)
Co-authored-by: Eddie Bimmel <eddie.bimmel@yoursurprise.com>
2020-04-20 23:55:48 +03:00
Brad Morrical
58a7d51295
Added recipe for Joomla! (#2024)
* Added recipe for Joomla!

* updating Changelog
2020-04-20 23:53:10 +03:00
David Naber
a20582eb95
Filter output upon stage argument only when defined for host fixes #1909 (#2021) 2020-04-07 18:41:42 +03:00
Alex
ae6f9690a4
Add default_timeout to configuration example (#2018) 2020-04-02 18:27:51 +03:00
Beno!t POLASZEK
a8dabf03ee
Keep consistency with deployer executable naming (#2011) 2020-03-06 12:49:07 +03:00
Ralf Baussenwein
613e631544
fix backward compatibility of bin/console for symfony4 recipe (#2005)
* fix backward compatibility of bin/console for symfony4 recipe

* update Changelog
2020-02-19 15:25:38 +03:00
Jono Menz
c0bf1d7913
Fix check_remote task revision resolution (#1995)
* Support branch & tag if specified
* Support shortened commit hashes
* Skip on first deployment
* Get true current ref from git

Fixes #1994
2020-02-01 22:15:53 +03:00
Vladimir Pak
377adf977a
Speedup deploy:clear_paths (#1992)
* Update clear_paths.php

one run much faster than several

* Update CHANGELOG.md
2020-01-30 12:08:11 +03:00
Jono Menz
b7a728b7b3
Fixes for check_remote task and SS recipe (#1991)
* Fix check_remote task

* Check remote head contents locally
* Ensure .dep/HEAD file is available so error isn’t thrown
* Document task usage

Fixes #1990

* Fix Silverstripe recipe

* Additionally check shared directory for assets since this directory is commonly excluded from project git repos
* Ensure shared_assets returns a non-null value so the release folder can’t get accidentally deleted

Fixes #1989

* Update CHANGELOG.md

* Clarified contribution instructions

* Update issue templates

Added a bug report template
2020-01-29 11:13:11 +03:00
Anton Medvedev
5095b5de16 Release 6.7.3 2019-12-18 20:30:49 +03:00
Arnout Boks
5f32216c11 More Symfony 5 compatibility fixes (#1971)
* Make Rsync compatible with symfony/process v5

* Make Ssh client compatible with symfony/process v5

* Add CHANGELOG entry
2019-12-17 20:43:48 +07:00
Anton Medvedev
97c63e91cc Release v6.7.2 2019-12-16 18:41:57 +07:00
Anton Medvedev
6242bb8748 Release v6.7.1 2019-12-15 21:13:11 +07:00
Anton Medvedev
86c7b3848f Fix incompatibility with Symfony 5 2019-12-15 21:11:39 +07:00