Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 28 additions & 28 deletions docs/recipe/magento2.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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
Expand All @@ -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

Expand All @@ -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`.

Expand All @@ -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

Expand All @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -579,23 +579,23 @@ 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.




### 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.




### 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.

Expand All @@ -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.

Expand All @@ -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.

Expand All @@ -640,47 +640,47 @@ 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.

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.




### 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.




### 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.




### 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.




### 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.

Expand All @@ -697,15 +697,15 @@ 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.




### 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.

Expand All @@ -719,15 +719,15 @@ 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.

After successful deployment, move the tmp_env.php file to env.php ready for next deployment


### 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.

Expand All @@ -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.

Expand All @@ -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.

Expand All @@ -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.

Expand All @@ -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.

Expand Down
2 changes: 2 additions & 0 deletions recipe/magento2.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down