47 Commits

Author SHA1 Message Date
Giacomo Moscardini
f3703cf698
Add another check for setup:upgrade (#3658)
* Add another check for setup:upgrade

* Update documentation

* Revert "Update documentation"

This reverts commit 120bf5e7a2cb3b52dcb1119648e53da144a07dc2.

* Update documentation
2024-04-03 15:58:34 +02:00
gbobts
cca12a1e7e
Add feature to stop cron before deployment and start cron after (#3797)
* Add feature to stop cron before deployment and start cron after

* Updated doc
2024-03-29 19:45:17 +01:00
Tom Scott-Malden
4dc20ce742
DD#0000: feat: Move var-exporter into main requirements (#3662)
* DD#0000: feat: Move var-exporter into main requirements

* DD#0000: feat: Removed var-export

* DD#0000: feat: Updated docs
2023-08-04 16:36:47 +02:00
Itay Raz
37eef8489b
use {{bin/magento}} to build static content (#3651) 2023-07-25 17:25:59 +02:00
Tom Scott-Malden
48193c6cfc
DD#0000: feat: Magento2: Add support for preload keys (#3567)
* DD#0000: feat: Magento2: Add support for preload keys

- Also updated to remove the config set and instead manually add the hocks to your deployer file
- And move var-exporter into the main composer require
- https://github.com/deployphp/deployer/pull/3453#issuecomment-1497248859

* DD#0000: feat: Reverted composer updates

* DD#0000: feat: Updated docs

* DD#0000: feat: Updated replace to use preg to make sure it only checks beginning of string
Updated readme use better grammer

* DD#0000: feat: Updated md docs
2023-07-04 10:57:38 +02:00
Sam James
ed28cb1cba
Fix/m2 artifact success (#3601)
* Call deploy:success at the end of Magento 2 Artifact Finish

* Regenerated Docs
2023-05-18 14:09:22 +02:00
guvra
4a40c60afb
Fix artifact file generation when "from_repo" option is enabled (#3560) 2023-04-05 11:15:42 +02:00
Tom Scott-Malden
7fa09a2299
Magento 2: Cache key id prefix (#3453) 2023-03-30 17:34:07 +02:00
Peter Jaap Blaakmeer
bb5fd1c1b9
Compile all themes when magento_themes is not set (#3550)
* Compile all themes when magento_themes is not set

* Add space at else structure
2023-03-27 23:06:59 +02:00
Julian
78dd230379
Split asset compilation (#3326) 2023-03-24 11:45:54 +01:00
Fabian Schmengler /
f9b5c1e52b
Magento 2: Only set maintenance mode once if needed (#3469)
* Only set maintenance mode once if needed

Also:
- by adding magento:maintenance:enable-if-needed to the task list instead of invoking it directly, it is now possible to use after() to add custom tasks to be performed in maintenance mode
- the maintenance_mode_status_active check was removed because it is unnecessary and can return wrong results because of caching

* Update docs
2023-03-06 19:41:41 +01:00
Wilfried Wolf
b565fdcc58
Adds Comments to magento2 recipe and modifies DocGen, to be able to explain artifact deployment (#3510)
* adds sticky to writable recipe

chgrp for all files, chmod g+rwxs for directories, chmod g+rw for files

* adds artifact deployment for magento2 recipe

* Updates Documentation

* removes mode that has been submitted in other MR

* adds divers discussion results from PR #3317

- uses contrib/cachetool
- removes task build:prepare-env
- comments additional_shared_files and additonal_shared_dirs
- avoids invoke()

* updates docs

* corrects additional shared

* expands DocGen for artifact deployment and adds documentation to the magento2 recipe

* corrects missing capital and typo

---------

Co-authored-by: Anton Medvedev <anton@medv.io>
2023-03-06 12:49:42 +01:00
akosglue
6190cbead3
fix typo in magento recipe (#3498) 2023-02-22 09:03:59 +01:00
Fabian Schmengler /
762a177ce1
Magento: allow subdirectory and create variable for bin/magento (#3460)
* Magento: create variable for bin/magento

so it can be overridden to a custom location

* Update docs

* Allow Magento to be installed in a subdirectory

* Update docs

* Use Magento subdirectory for composer command

* Fix bin/magento call in magento_version function

* Update docs

* Update docs

* Combine magento_dir and bin/magento configurations correctly
2023-02-09 14:17:39 +01:00
Fabian Schmengler /
8a94172fd5
Magento: Fix artifact_path generation (#3459)
* Magento: Fix artifact_path generation

- Fix 1. Add -p parameter to mkdir command
   {{artifact_path}} could be configured with multiple folders such as build/artifacts
- Fix 2. run() -> runLocally()
   The {{artifact_dir}} is used to keep artifacts archive file.
   It should be called at CI server only and not at target server.
   Then the task `artifact:upload` uploads this file at target server host under {{release_path}}.
   It is not needed to have {{artifact_dir}} at target server.

* Update docs
2023-01-30 21:15:09 +01:00
guvra
30c66cee47
Add an option to build magento artifact from the repository (#3456) 2023-01-30 21:14:51 +01:00
Wilfried Wolf
2078514738
Feature/magento2 artifact deployment (#3317)
* adds sticky to writable recipe

chgrp for all files, chmod g+rwxs for directories, chmod g+rw for files

* adds artifact deployment for magento2 recipe

* Updates Documentation

* removes mode that has been submitted in other MR

* adds divers discussion results from PR #3317

- uses contrib/cachetool
- removes task build:prepare-env
- comments additional_shared_files and additonal_shared_dirs
- avoids invoke()

* updates docs

* corrects additional shared

Co-authored-by: Anton Medvedev <anton@medv.io>
2023-01-08 21:46:15 +01:00
Torben Höhn
492cd97945
add pub/static/_cache as shared_dir (#3343) 2023-01-08 21:35:48 +01:00
Michał Giza
6981405647
Magento2: add var/page_cache as writable_dirs (#3202)
* var/page_cache as writable_dirs

It will fix following Zend exception after successful deployment:
Fatal error: Uncaught Zend_Cache_Exception: cache_dir "/path/to/www/releases/7/var/page_cache" is not writable in /path/to/www/releases/7/vendor/magento/zendframework1/library/Zend/Cache.php:209
This exception does not occur on every environment, it depends on PHP pool user/group (default www-data or owner of project directory).

* docgen
2022-08-28 18:49:05 +02:00
Peter Jaap Blaakmeer
297e57dc3c
Remove .maintenance.flag from shared_files
Since shared files are created when they don't exist and this puts the shop in maintenance mode on each deploy, see https://github.com/deployphp/deployer/discussions/2940
2022-03-28 14:57:06 +02:00
Tom Scott-Malden
8a41b3f030
DD#0000: feat: Added configurable themes to Magento2 (#3047)
* DD#0000: feat: Added configurable themes to Magento2

* DD#0000: feat: Added concurrent jobs to static:content:deploy
2022-03-22 15:10:25 +01:00
Laura Folco
5550911cf6
Magento2: allow non-zero-downtime deployment (#2941)
* Magento2: allow non-zero-downtime deployment; add `.maintenance.flag` to shared files

* ran docgen
2022-03-03 21:21:08 +01:00
Peter Jaap Blaakmeer
abfb9bb235
Update magento2.php
Added var/.maintenance.flag as a shared file, closes issue #2940
2022-02-03 09:19:34 +01:00
Simon Sprankel
0305fc26f0
Fix Magento version detection, fixes #2905 (#2906) 2022-01-17 21:07:32 +01:00
Peter Jaap Blaakmeer
d28bb9f5a7
Fix maintenance status check (#2748)
This command fails when it is a deployment to a newly provisioned server since the current_path does not exist
2021-11-14 15:22:59 +01:00
Anton Medvedev
a2b3da8c32 Add *s 2021-11-08 22:59:39 +01:00
Peter Jaap Blaakmeer
a4801b6090
Make Magento 2 recipe suitable for push strategy deployments (#2734)
* Make Magento 2 recipe suitable for push strategy deployments

* updated Magento 2 recipe docs

* Disable task by using disabled()

* Removed push strategy settings, moved build commands to its own group

* Updated docs
2021-11-07 22:50:16 +01:00
memen45
85ba976307
Update magento2.php (#2452)
Fixes failed deploys when app/etc/config.php is changed with added sites, stores, store views or themes.

Co-authored-by: Fabian Blechschmidt <github@fabian-blechschmidt.de>
2021-04-11 16:49:46 +02: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
Simon Sprankel
cfc3ecbde4
Fix formatting (#2443)
* Fix formatting

* Fix formatting
2021-03-05 11:51:18 +01:00
Anton Medvedev
9296a5acc8
Sync content_version for magento assets between hosts. (#2293)
* Sync content_version for magento assets between hosts.

* Update docs
2020-12-08 00:02:08 +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
ff110c987d
Refactor recipes (#2224) 2020-10-25 18:00:05 +03:00
Anton Medvedev
c88ebe275f Allow to change current_path 2020-10-09 01:35:42 +02:00
Anton Medvedev
a1103bee17 Migrate to common prepare/publish tasks 2020-10-08 01:53:45 +02:00
Anton Medvedev
29a643b623 v7 2020-05-16 18:02:17 +03:00
Antoine Kociuba
727d7ee7f1 [HOTFIX] - magento2 recipe - Properly handle 'generated' and not 'generation' directory for >= 2.2.x Magento versions (#1879) 2019-07-06 00:27:27 +03:00
Rafael Corrêa Gomes
681eedcdcb Recipe Magento 2 > Change the shared folders (#1848)
* Recipe Magento 2 > Change the shared folders

* Update magento2.php
2019-05-26 14:30:18 +07:00
Jamie Burchell
3a6d4878fa Add missing deploy:writable entries (#1662) 2018-08-27 13:33:45 +07:00
Rudolph Gottesheim
25e0824cb1 Remove magento:enable from Magento 2 recipe (#1606)
* Remove magento:enable from Magento 2 recipe

Magento's module states are stored in app/etc/config.php. This task
ignored that and blindly enabled all installed modules.

* Mention the removal of magento:enable in the changelog
2018-08-27 13:33:45 +07:00
Barry vd. Heuvel
67eb39e295
Magento2: use setup:upgrade --keep-generated 2017-12-14 17:24:59 +01:00
Barry vd. Heuvel
5d8f999243 Run autoloader after compilation 2017-09-18 11:23:21 +02:00
Anton Medvedev
ae51d763b9 Add deploy:info to recipes 2017-08-12 12:01:27 +03:00
Barry vd. Heuvel
f46a483244 Disable maintenance after failure 2017-05-30 10:42:37 +02:00
Barry vd. Heuvel
e184723dae Only enable/disable maintenance when current exists 2017-03-21 18:02:16 +01:00
Anton Medvedev
de963c8866 Refactor magento2 recipe 2017-01-19 11:38:37 +07:00
Unai Lopez
cda4b69d5e add magento2 base recipe 2016-11-28 11:11:23 +01:00