diff --git a/docs/recipe/magento2.md b/docs/recipe/magento2.md index 296201eb0..18d65f382 100644 --- a/docs/recipe/magento2.md +++ b/docs/recipe/magento2.md @@ -380,7 +380,7 @@ true ### artifact_file -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L361) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L363) Artifact deployment section The file the artifact is saved to @@ -391,7 +391,7 @@ The file the artifact is saved to ### artifact_dir -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L364) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L366) The directory the artifact is saved in @@ -401,7 +401,7 @@ The directory the artifact is saved in ### artifact_excludes_file -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L368) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L370) Points to a file with a list of files to exclude from packaging. The format is as with the `tar --exclude-from=[file]` option @@ -412,7 +412,7 @@ The format is as with the `tar --exclude-from=[file]` option ### build_from_repo -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L371) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L373) If set to true, the artifact is built from a clean copy of the project repository instead of the current working directory @@ -422,7 +422,7 @@ false ### repository -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L374) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L376) Overrides [repository](/docs/recipe/common.md#repository) from `recipe/common.php`. @@ -434,7 +434,7 @@ null ### artifact_path -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L377) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L379) The relative path to the artifact file. If the directory does not exist, it will be created @@ -447,7 +447,7 @@ return get('artifact_dir') . '/' . get('artifact_file'); ### bin/tar -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L385) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L387) The location of the tar command. On MacOS you should have installed gtar, as it supports the required settings :::info Autogenerated @@ -458,14 +458,14 @@ The value of this configuration is autogenerated on access. ### additional_shared_files -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L457) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L459) Array of shared files that will be added to the default shared_files without overriding ### additional_shared_dirs -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L459) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L461) Array of shared directories that will be added to the default shared_dirs without overriding @@ -579,7 +579,7 @@ Upgrades magento database. ### magento\:upgrade {#magento-upgrade} -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L317) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L319) Run upgrades if needed. @@ -587,7 +587,7 @@ Run upgrades if needed. ### magento\:cache\:flush {#magento-cache-flush} -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L326) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L328) Flushes Magento Cache. @@ -595,7 +595,7 @@ Flushes Magento Cache. ### deploy\:magento {#deploy-magento} -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L331) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L333) Magento2 deployment operations. @@ -611,7 +611,7 @@ This task is group task which contains next tasks: ### magento\:build {#magento-build} -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L340) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L342) Magento2 build operations. @@ -624,7 +624,7 @@ This task is group task which contains next tasks: ### deploy {#deploy} -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L346) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L348) Deploys your project. @@ -640,7 +640,7 @@ This task is group task which contains next tasks: ### artifact\:package {#artifact-package} -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L396) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L398) Packages all relevant files in an artifact. @@ -648,7 +648,7 @@ tasks section ### artifact\:upload {#artifact-upload} -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L406) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L408) Uploads artifact in release folder for extraction. @@ -656,7 +656,7 @@ Uploads artifact in release folder for extraction. ### artifact\:extract {#artifact-extract} -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L411) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L413) Extracts artifact in release path. @@ -664,7 +664,7 @@ Extracts artifact in release path. ### build\:remove-generated {#build-remove-generated} -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L417) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L419) Clears generated files prior to building. @@ -672,7 +672,7 @@ Clears generated files prior to building. ### build\:prepare {#build-prepare} -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L422) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L424) Prepare local artifact build. @@ -680,7 +680,7 @@ Prepare local artifact build. ### artifact\:build {#artifact-build} -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L447) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L449) Builds an artifact. @@ -697,7 +697,7 @@ This task is group task which contains next tasks: ### deploy\:additional-shared {#deploy-additional-shared} -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L463) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L465) Adds additional files and dirs to the list of shared files and dirs. @@ -705,7 +705,7 @@ Adds additional files and dirs to the list of shared files and dirs. ### magento\:set_cache_prefix {#magento-set_cache_prefix} -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L478) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L480) Update cache id_prefix. @@ -719,7 +719,7 @@ after('deploy:magento', 'magento:cleanup_cache_prefix'); ### magento\:cleanup_cache_prefix {#magento-cleanup_cache_prefix} -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L518) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L520) Cleanup cache id_prefix env files. @@ -727,7 +727,7 @@ After successful deployment, move the tmp_env.php file to env.php ready for next ### magento\:cron\:stop {#magento-cron-stop} -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L534) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L536) Remove cron from crontab and kill running cron jobs. @@ -739,7 +739,7 @@ To use this feature, add the following to your deployer scripts: ### magento\:cron\:install {#magento-cron-install} -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L550) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L552) Install cron in crontab. @@ -751,7 +751,7 @@ To use this feature, add the following to your deployer scripts: ### artifact\:prepare {#artifact-prepare} -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L556) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L558) Prepares an artifact on the target server. @@ -771,7 +771,7 @@ This task is group task which contains next tasks: ### artifact\:finish {#artifact-finish} -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L569) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L571) Executes the tasks after artifact is released. @@ -787,7 +787,7 @@ This task is group task which contains next tasks: ### artifact\:deploy {#artifact-deploy} -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L578) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L580) Actually releases the artifact deployment. diff --git a/recipe/magento2.php b/recipe/magento2.php index 5b18c4129..44b4a4615 100644 --- a/recipe/magento2.php +++ b/recipe/magento2.php @@ -306,6 +306,8 @@ function magentoDeployAssetsSplit(string $area) desc('Upgrades magento database'); task('magento:upgrade:db', function () { if (get('database_upgrade_needed')) { + // clear config cache, so there is no error when a new MQ topic is introduced + run("{{bin/php}} {{bin/magento}} cache:clean config"); run("{{bin/php}} {{bin/magento}} setup:db-schema:upgrade --no-interaction"); run("{{bin/php}} {{bin/magento}} setup:db-data:upgrade --no-interaction"); } else {