Skip to content

Commit c507df7

Browse files
committed
Deployment Process / SCD on build phase
1 parent dc0b162 commit c507df7

File tree

1 file changed

+37
-9
lines changed

1 file changed

+37
-9
lines changed

5. Deployment Process.md

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,12 @@ Ece-tools [\Magento\MagentoCloud\App\Container](https://github.com/magento/ece-t
8888

8989
`php ./vendor/bin/ece-tools build:generate`
9090

91+
> notice: Starting generate command. (magento/ece-tools version: 2002.0.17, magento/magento2-base version: 2.2.8)
92+
9193
- [Process\Build\PreBuild](https://github.com/magento/ece-tools/tree/develop/src/Process/Build/PreBuild.php)
9294
- check VERBOSE_COMMANDS in `.magento.env.yaml`
93-
- check and clean `generated/code` folder
94-
- check and clean `generated/metadata` folder
95+
- clean `generated/code` folder
96+
- clean `generated/metadata` folder
9597
- delete flag `.static_content_deploy` file
9698
- [Process\ValidateConfiguration](https://github.com/magento/ece-tools/tree/develop/src/Process/ValidateConfiguration.php)
9799
```php
@@ -114,10 +116,11 @@ Ece-tools [\Magento\MagentoCloud\App\Container](https://github.com/magento/ece-t
114116
],
115117
]),
116118
```
117-
see [Config/Validator/Build](https://github.com/magento/ece-tools/tree/develop/src/Config/Validator/Build) folder
119+
validators list: [Config/Validator/Build/](https://github.com/magento/ece-tools/tree/develop/src/Config/Validator/Build)
118120
- [Process\Build\RefreshModules](https://github.com/magento/ece-tools/tree/develop/src/Process/Build/RefreshModules.php)
119121
- see [\Config\Module::refresh](https://github.com/magento/ece-tools/tree/develop/src/Config/Module.php)
120122
- enable all modules `php ./bin/magento module:enable --all --ansi --no-interaction` if `modules` not found in the `app/etc/config.php`
123+
- do not enable already disabled modules (if `modules` found in the `app/etc/config.php`)
121124
- [Process\Build\ApplyPatches](https://github.com/magento/ece-tools/tree/develop/src/Process/Build/ApplyPatches.php)
122125
- applying patches (`Patch\Manager::applyAll`)
123126
- copyStaticFile: copy `pub/static.php` => `pub/front-static.php`
@@ -133,20 +136,45 @@ Ece-tools [\Magento\MagentoCloud\App\Container](https://github.com/magento/ece-t
133136
- [Process\Build\ComposerDumpAutoload](https://github.com/magento/ece-tools/tree/develop/src/Process/Build/ComposerDumpAutoload.php)
134137
- execute `composer dump-autoload -o --ansi --no-interaction`
135138
- [Process\Build\DeployStaticContent](https://github.com/magento/ece-tools/tree/develop/src/Process/Build/DeployStaticContent.php)
136-
- delete `scd_in_build` flag
139+
- delete `.static_content_deploy` flag file
137140
- validate [Config\Validator\GlobalStage\ScdOnBuild::validate](https://github.com/magento/ece-tools/blob/develop/src/Config/Validator/GlobalStage/ScdOnBuild.php#L72)
138-
- check SCD_ON_DEMAND
139-
- check SKIP_SCD
141+
- check SCD_ON_DEMAND: false
142+
- check SKIP_SCD: false
140143
- validate [Config\Validator\Build\ConfigFileStructure::validate](https://github.com/magento/ece-tools/blob/develop/src/Config/Validator/Build/ConfigFileStructure.php#L63)
141144
- in the `app/etc/config.php`
142145
- scopes/websites (count($websites) > 0)
143146
- scopes/stores (count($stores) > 0 )
144-
- if all checks valid execure [Process\Build\DeployStaticContent\Generate](https://github.com/magento/ece-tools/tree/develop/src/Process/Build/DeployStaticContent/Generate.php)
145-
- TODO:
146-
147+
- if all checks valid, execute [Process\Build\DeployStaticContent\Generate](https://github.com/magento/ece-tools/tree/develop/src/Process/Build/DeployStaticContent/Generate.php)
148+
- build SCD commands [StaticContent\CommandFactory::matrix](https://github.com/magento/ece-tools/blob/develop/src/StaticContent/CommandFactory.php#L98)
149+
- [StaticContent\CommandFactory::build](https://github.com/magento/ece-tools/blob/develop/src/StaticContent/CommandFactory.php#L131)
150+
- command: `php ./bin/magento setup:static-content:deploy --ansi --no-interaction`
151+
- add ` -f` option (for magento > 2.2)
152+
- add ` -s {$stratagy}` from `SCD_STRATEGY` from `.magento.env.yaml` (for magento > 2.2)
153+
- add verbosity level (-v, -vv, -vvv) from `VERBOSE_COMMANDS` from `.magento.env.yaml`
154+
- add ` --jobs {$threadCount}` threads count: `SCD_THREADS` from `.magento.env.yaml`
155+
- add ` --no-html-minify` by `SKIP_HTML_MINIFICATION` (default: true) from `.magento.env.yaml`
156+
- result example: `php ./bin/magento setup:static-content:deploy --ansi --no-interaction -f --jobs 3 --no-html-minify`
157+
- default command (`StaticContent\CommandFactory::create($option, array_keys($matrix))`) based on given options
158+
- run: StaticContent\CommandFactory::build
159+
- get excluded themes: `SCD_EXCLUDE_THEMES` from `.magento.env.yaml` (deprecated)
160+
- exclude themes from `SCD_MATRIX`
161+
- add unique locales [StaticContent\Build\Option::getLocales](https://github.com/magento/ece-tools/blob/develop/src/StaticContent/Build/Option.php#L124)
162+
- `ADMIN_LOCALE` from (MAGENTO_CLOUD_VARIABLES) (default: en_US)
163+
- `general/locale/code` from `app/etc/config.php`
164+
- `admin_user/locale/code` from `app/etc/config.php`
165+
- add `en_US`
166+
- result example: `php ./bin/magento setup:static-content:deploy --ansi --no-interaction -f --jobs 3 --no-html-minify --exclude-theme Magento/blank --exclude-theme Magento/luma en_US nb_NO`
167+
- generate commands based on `SCD_MATRIX` from `.magento.env.yaml`
168+
- run: StaticContent\CommandFactory::build
169+
- add ` --theme {$resolvedTheme}`
170+
- add `language` from `SCD_MATRIX` (en_US, nb_NO)
171+
- result example: `php ./bin/magento setup:static-content:deploy --ansi --no-interaction -f --jobs 3 --no-html-minify --theme Magento/blank en_US nb_NO`
172+
- execute all commands
173+
> notice: Generate command completed.
147174

148175
`php ./vendor/bin/ece-tools build:transfer`
149176

177+
150178
- [Process\Build\ClearInitDirectory](https://github.com/magento/ece-tools/tree/develop/src/Process/Build/ClearInitDirectory.php)
151179
- [Process\Build\BackupData](https://github.com/magento/ece-tools/tree/develop/src/Process/Build/BackupData.php)
152180

0 commit comments

Comments
 (0)