222 Commits

Author SHA1 Message Date
Propaganistas
ef0087d988
Add release name to deploy:info (#3783)
* add release name to info

* failsafe for initial deployment
2024-02-26 14:30:43 +01:00
Fritz Michael Gschwantner
fc9a2f13ad
Escape shell arguments correctly (#3603)
* escape shell argument depending on target operating system

* only escape unix style

* add some basic tests

* use json_encode in test

* correctly escape single quotes on the Linux command line
2024-02-11 23:01:51 +01:00
Philipp Bammes
8d23bac440
Fix typo in rollback.php (#3617)
* Fix typo in `rollback.php`

* Fix typos in `rollback.php`

* `php bin/docgen`
2023-06-12 09:27:24 +02:00
Anton Medvedev
2ac3b89d97 Fix branch deploy for clone strategy 2023-03-01 21:12:14 +01:00
Jan Henk Hazelaar
3953996a30
Add remote option to update_code_strategy to rename remote to repository (#3466)
* Add 'remote' option to 'update_code_strategy'

* Using archive and then add remote to speedup deployment

* Optimize remote option and add documentation

* Optimize code

* Update docs

* Combine clone and remote to remove duplicate code

* Removed  option and merge functionality into  option

* Generate docs

* Generate docs
2023-02-10 23:51:27 +01:00
Dominik Schilling
1fb2d6f3cd
Simplify loop in releases_list (#3471)
* Avoid calling count() in loop
* Remove extra variable for release name
* Reverse the array before for clarity
2023-01-30 21:19:57 +01:00
Stephen Ostrow
6b354c2e89
update writable deploy recipe to use release_or_current_path (#3449)
Updating this task to use release_or_current_path (from #2486)  will allow the writable task to be used outside of deployment
2023-01-16 11:04:32 +01:00
Anton Medvedev
9fa0d8f4a3
Remove default value for previous_release
Fixes #3318
2022-10-04 21:25:50 +02:00
Colin O'Dell
d3156ff60d
Escape metainfo to prevent bash syntax errors (#3328) 2022-10-02 21:36:34 +02:00
Wilfried Wolf
6d759ef372
Feature/additional writable modes (#3316)
* adds sticky and skip mode

Sticky means, that the command-line-user and the http-user are different but share the same group. This mode add a sticky bit to directories and adds writeable for group to all files.
Skip just skips this in case the interactiv user and the http user are equal

* adds comments to file

* updates documentation
2022-09-22 22:45:48 +02:00
Anton Medvedev
7783299378 Only delete symlink on broken release
This is safe to do as we keep track of successful releases.
2022-09-10 09:34:55 +02:00
Anton Medvedev
377970ef24 Improve error message: show next free release 2022-09-10 09:18:22 +02:00
Anton Medvedev
ed626d4b19 Add exception to accessing previous_release outside of release. 2022-09-10 09:10:09 +02:00
Marcus Jaschen
fe3874370b
Use correct Git ref spec when sub_directory is specified. (#3138)
* Use correct Git ref spec when `sub_directory` is specified.

The bug is described in detail in issue #3137.

* change variable name for sub-directory target (as requested in PR)
2022-05-24 21:36:50 +02:00
Tom Scott-Malden
97cbbd4d79
Add username in deploy:lock error message (#3046)
* Update to the lock recipe so that it shows you who currently has the lock on the deployment

* DD#0000: feat: Updated joy test

* DD#0000: feat: Regenerated docs
2022-03-22 15:27:41 +01:00
Anton Medvedev
208bf652fe Fix sub_directory update code strategy 2022-03-17 20:07:19 +01:00
Anton Medvedev
cab76aee6b Limit release_log to 300 2022-03-13 00:45:30 +01:00
Anton Medvedev
4ec52d645e
Update info.php 2022-03-03 22:20:50 +01:00
matsn0w
baece5a6e3
Add an option to deploy only a sub-folder of the repository (#2821)
* add new sub_directory option

* update docs

* Update docs/recipe/deploy/update_code.md

Co-authored-by: Mario Ramundo <ramundomario@gmail.com>

Co-authored-by: Mario Ramundo <ramundomario@gmail.com>
Co-authored-by: Anton Medvedev <anton@medv.io>
2022-03-03 21:35:25 +01:00
Yanick Witschi
fdb18d0a8e
Make sure to use the correct PHP binary with existing Composer (#2967)
* Make sure to use the correct PHP binary with existing Composer

* Typo

* Typo again
2022-03-03 21:15:49 +01:00
Dr. Ulrich Thomas Gabor
b6d646d8e3
Use -L on chgrp (#2834) 2022-01-17 19:22:12 +01:00
Thomas
ca6eb27232
Don't add remote user to setfacl command, if it doesn't exist as an os user (#2822)
* Update writable.php

Only add the the remote user to setfacl command if he exists as an os user.

* Replace is_int() with !empty().

run() usually returns a string, so the static analyzer throws an error, when using is_int() on its return value.

* Use test() instead of run()

Use test() instead of run to check whether the remote user also exists as an os user.
2022-01-15 13:36:13 +01:00
Anton Medvedev
a616c9ecf8
Update writable.php 2022-01-13 21:26:03 +01:00
Anton Medvedev
a52ae3da6a Small fixes 2022-01-13 14:30:46 +01:00
Anton Medvedev
a92bec4880 Remove unused use. 2022-01-13 14:30:42 +01:00
Alex Mayer
2ff8593027
Refactor deploy:cleanup Command (#2788)
* Refactor deploy:cleanup Command

Remove $runOpts since it's not actually used
Move release symlink deletion to beginning of method. This will
allow the release symlink to be deleted even if deleting the old
releases fails.

* Refactor deploy:releases_log

Fixes issue where multiple failed releases in a row cause old
releases to not be cleaned up.

Fixes #2759

Co-authored-by: Anton Medvedev <anton@medv.io>
2022-01-13 14:29:32 +01:00
Anton Medvedev
45e4708aad Use StrictHostKeyChecking=accept-new by default
Don't prefix composer with {{bin/php}} if the composer found with which().
2022-01-13 14:17:08 +01:00
Anton Medvedev
fb6f2154ef Use StrictHostKeyChecking=accept-new by default
I deleted code which was doing known_host population manually as it was buggy. The StrictHostKeyChecking=accept-new is exactly what we need.
2022-01-11 19:56:59 +01:00
Luca Rath-Heel
8c14ae44b7
Cd to deploy_path in release_name callback
* Update release.php

* Run bin/docgen

* Update release.php
2022-01-11 19:07:29 +01:00
Dr. Ulrich Thomas Gabor
43953628cf
Fix for #2850 (#2852): whoami fails on some hosters 2022-01-10 19:49:04 +01:00
Anton Medvedev
465aed48d8 Improve deploy:info task 2021-11-21 11:30:08 +01:00
Anton Medvedev
92a0eb6eb1 Refactor deploy:update_code to use target config 2021-11-21 11:20:42 +01:00
Anton Medvedev
3e1540440e Remove shallow() task method 2021-11-21 10:57:25 +01:00
Anton Medvedev
55879f95ee Replace ``bash with `` 2021-11-10 23:20:32 +01:00
Jamie Burchell
272201779b
Fix minor typos in comments (#2744) 2021-11-10 22:36:20 +01:00
Anton Medvedev
a2b3da8c32 Add *s 2021-11-08 22:59:39 +01:00
Anton Medvedev
a50aac23c6 Typo in desc 2021-11-07 09:32:46 +01:00
Anton Medvedev
fe14f02aec Add doc on releases task 2021-11-07 00:29:15 +01:00
Anton Medvedev
1cd8ae2138 Add rollback docs 2021-11-05 23:17:29 +01:00
Anton Medvedev
0c7c0b1af6 Rename locateBinaryPath to which 2021-11-05 15:23:34 +01:00
Anton Medvedev
dc4a75ce3d Don't use {{remote_user}} in writable 2021-10-27 00:40:18 +02:00
Anton Medvedev
d7011cc185 Don't modify state inside set callback 2021-10-22 23:22:18 +02:00
Anton Medvedev
7f39d1fd04 Move configs around and update docs 2021-10-18 18:29:14 +02:00
Anton Medvedev
113e5cca80 Make deploy:lock little faster 2021-10-16 00:28:06 +02:00
Anton Medvedev
c568c3d934 Add better error message 2021-10-13 21:31:26 +02:00
Anton Medvedev
377b722611 Refactor checkout strategy to clone 2021-10-12 22:49:34 +02:00
Anton Medvedev
ded366723f Speed up deploy:setup task 2021-10-11 22:10:47 +02:00
Anton Medvedev
1b71c9cd81 Fix desc spelling 2021-10-11 22:10:24 +02:00
Anton Medvedev
09328c3ecf No caddy in http_{user,group} detection 2021-10-11 22:10:05 +02:00
Anton Medvedev
3105caa1ce Refactor deploy:is-unlocked to deploy:is_locked 2021-10-11 22:08:58 +02:00