Skip to content

Commit

Permalink
MAGECLOUD-4109: Introduce extensibility mechanism based on Dependency…
Browse files Browse the repository at this point in the history
… Injection (magento#620)
  • Loading branch information
oshmyheliuk authored and shiftedreality committed Oct 18, 2019
1 parent cc64afe commit db8cabe
Show file tree
Hide file tree
Showing 25 changed files with 1,522 additions and 320 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
"symfony/config": "^3.4||^4.3",
"symfony/dependency-injection": "^3.4||^4.3",
"symfony/process": "^2.1||^4.1",
"symfony/serializer": "^4.2",
"symfony/yaml": "^4.0"
"symfony/serializer": "^3.3",
"symfony/yaml": "^3.3||^4.0"
},
"suggest": {
"magento/magento-cloud-docker": "^1.0"
Expand Down
6 changes: 5 additions & 1 deletion config/scenario.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="argumentType" abstract="true" mixed="true">
<xs:attribute name="name" use="required"/>
<xs:attribute name="priority" type="xs:integer"/>
<xs:attribute name="skip" type="xs:boolean"/>
</xs:complexType>

<xs:element name="scenario">
Expand Down Expand Up @@ -49,7 +51,9 @@
</xs:element>
</xs:choice>
<xs:attribute name="name" type="xs:string" use="required"/>
<xs:attribute name="type" type="phpClassName" use="required"/>
<xs:attribute name="type" type="phpClassName"/>
<xs:attribute name="priority" type="xs:integer"/>
<xs:attribute name="skip" type="xs:boolean"/>
</xs:complexType>

<xs:simpleType name="phpClassName">
Expand Down
1 change: 1 addition & 0 deletions config/services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
<service id="Magento\MagentoCloud\Step\Deploy\InstallUpdate\Install" autowire="false" />
<service id="Magento\MagentoCloud\Step\Deploy\InstallUpdate\Update" autowire="false" />
<service id="Magento\MagentoCloud\Step\Deploy\PreDeploy" autowire="false" />
<service id="Magento\MagentoCloud\Step\SkipStep" autowire="false" />
<service id="Magento\MagentoCloud\Step\StepComposite" autowire="false" />
<service id="Magento\MagentoCloud\Step\StepException" autowire="false" />
<service id="Magento\MagentoCloud\Step\ValidateConfiguration" autowire="false" />
Expand Down
48 changes: 21 additions & 27 deletions scenario/build/generate.xml
Original file line number Diff line number Diff line change
@@ -1,47 +1,41 @@
<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<scenario xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:ece-tools:config/scenario.xsd">
<step name="pre-build" type="Magento\MagentoCloud\Step\Build\PreBuild"/>
<step name="set-production-mode" type="Magento\MagentoCloud\Step\SetProductionMode"/>
<step name="validate-configuration" type="Magento\MagentoCloud\Step\ValidateConfiguration">
<step name="pre-build" type="Magento\MagentoCloud\Step\Build\PreBuild" priority="100"/>
<step name="set-production-mode" type="Magento\MagentoCloud\Step\SetProductionMode" priority="200"/>
<step name="validate-configuration" type="Magento\MagentoCloud\Step\ValidateConfiguration" priority="300">
<arguments>
<argument name="logger" xsi:type="object">Psr\Log\LoggerInterface</argument>
<argument name="validators" xsi:type="array">
<item name="500" xsi:type="array">
<item name="composer" xsi:type="object">Magento\MagentoCloud\Config\Validator\Build\ComposerFile</item>
<item name="stage-config" xsi:type="object">Magento\MagentoCloud\Config\Validator\Build\StageConfig</item>
<item name="composer" xsi:type="object" priority="100">Magento\MagentoCloud\Config\Validator\Build\ComposerFile</item>
<item name="stage-config" xsi:type="object" priority="200">Magento\MagentoCloud\Config\Validator\Build\StageConfig</item>
</item>
<item name="300" xsi:type="array">
<item name="config-file-exists" xsi:type="object">Magento\MagentoCloud\Config\Validator\Build\ConfigFileExists</item>
<item name="deprecated-ini" xsi:type="object">Magento\MagentoCloud\Config\Validator\Build\UnsupportedBuildOptionsIni</item>
<item name="stage-config-deprecated-variables" xsi:type="object">Magento\MagentoCloud\Config\Validator\Build\StageConfigDeprecatedVariables</item>
<item name="modules-exists" xsi:type="object">Magento\MagentoCloud\Config\Validator\Build\ModulesExists</item>
<item name="appropriate-version" xsi:type="object">Magento\MagentoCloud\Config\Validator\Build\AppropriateVersion</item>
<item name="scd-options-ignorance" xsi:type="object">Magento\MagentoCloud\Config\Validator\Build\ScdOptionsIgnorance</item>
<item name="ideal-state" xsi:type="object">Magento\MagentoCloud\Config\Validator\IdealState</item>
<item name="config-file-exists" xsi:type="object" priority="100">Magento\MagentoCloud\Config\Validator\Build\ConfigFileExists</item>
<item name="deprecated-ini" xsi:type="object" priority="200">Magento\MagentoCloud\Config\Validator\Build\UnsupportedBuildOptionsIni</item>
<item name="stage-config-deprecated-variables" xsi:type="object" priority="300">Magento\MagentoCloud\Config\Validator\Build\StageConfigDeprecatedVariables</item>
<item name="modules-exists" xsi:type="object" priority="400">Magento\MagentoCloud\Config\Validator\Build\ModulesExists</item>
<item name="appropriate-version" xsi:type="object" priority="500">Magento\MagentoCloud\Config\Validator\Build\AppropriateVersion</item>
<item name="scd-options-ignorance" xsi:type="object" priority="600">Magento\MagentoCloud\Config\Validator\Build\ScdOptionsIgnorance</item>
<item name="ideal-state" xsi:type="object" priority="700">Magento\MagentoCloud\Config\Validator\IdealState</item>
</item>
</argument>
</arguments>
</step>
<step name="refresh-modules" type="Magento\MagentoCloud\Step\Build\RefreshModules"/>
<step name="apply-patches" type="Magento\MagentoCloud\Step\Build\ApplyPatches"/>
<step name="set-report-dir-nesting-level" type="Magento\MagentoCloud\Step\Build\SetReportDirNestingLevel"/>
<step name="marshall-files" type="Magento\MagentoCloud\Step\Build\MarshallFiles"/>
<step name="copy-sample-data" type="Magento\MagentoCloud\Step\Build\CopySampleData"/>
<step name="compile-di" type="Magento\MagentoCloud\Step\Build\CompileDi"/>
<step name="dump-autoload" type="Magento\MagentoCloud\Step\Build\ComposerDumpAutoload"/>
<step name="deploy-static-content" type="Magento\MagentoCloud\Step\Build\DeployStaticContent">
<step name="refresh-modules" type="Magento\MagentoCloud\Step\Build\RefreshModules" priority="400"/>
<step name="apply-patches" type="Magento\MagentoCloud\Step\Build\ApplyPatches" priority="500"/>
<step name="set-report-dir-nesting-level" type="Magento\MagentoCloud\Step\Build\SetReportDirNestingLevel" priority="600"/>
<step name="marshall-files" type="Magento\MagentoCloud\Step\Build\MarshallFiles" priority="700"/>
<step name="copy-sample-data" type="Magento\MagentoCloud\Step\Build\CopySampleData" priority="800"/>
<step name="compile-di" type="Magento\MagentoCloud\Step\Build\CompileDi" priority="900"/>
<step name="dump-autoload" type="Magento\MagentoCloud\Step\Build\ComposerDumpAutoload" priority="1000"/>
<step name="deploy-static-content" type="Magento\MagentoCloud\Step\Build\DeployStaticContent" priority="1100">
<arguments>
<argument name="logger" xsi:type="object">Psr\Log\LoggerInterface</argument>
<argument name="flag-manager" xsi:type="object">Magento\MagentoCloud\Filesystem\Flag\Manager</argument>
<argument name="scd-on-build" xsi:type="object">Magento\MagentoCloud\Config\Validator\GlobalStage\ScdOnBuild</argument>
<argument name="steps" xsi:type="array">
<item name="generate" xsi:type="object">Magento\MagentoCloud\Step\Build\DeployStaticContent\Generate</item>
<item name="generate" xsi:type="object" priority="100">Magento\MagentoCloud\Step\Build\DeployStaticContent\Generate</item>
</argument>
</arguments>
</step>
Expand Down
16 changes: 5 additions & 11 deletions scenario/build/transfer.xml
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<scenario xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:ece-tools:config/scenario.xsd">
<step name="compress-static-content" type="Magento\MagentoCloud\Step\Build\CompressStaticContent"/>
<step name="clear-init-directory" type="Magento\MagentoCloud\Step\Build\ClearInitDirectory"/>
<step name="backup-data" type="Magento\MagentoCloud\Step\Build\BackupData">
<step name="compress-static-content" type="Magento\MagentoCloud\Step\Build\CompressStaticContent" priority="100"/>
<step name="clear-init-directory" type="Magento\MagentoCloud\Step\Build\ClearInitDirectory" priority="200"/>
<step name="backup-data" type="Magento\MagentoCloud\Step\Build\BackupData" priority="300">
<arguments>
<argument name="logger" xsi:type="object">Psr\Log\LoggerInterface</argument>
<argument name="steps" xsi:type="array">
<item name="static-content" xsi:type="object">Magento\MagentoCloud\Step\Build\BackupData\StaticContent</item>
<item name="writable-dirs" xsi:type="object">Magento\MagentoCloud\Step\Build\BackupData\WritableDirectories</item>
<item name="static-content" xsi:type="object" priority="100">Magento\MagentoCloud\Step\Build\BackupData\StaticContent</item>
<item name="writable-dirs" xsi:type="object" priority="200">Magento\MagentoCloud\Step\Build\BackupData\WritableDirectories</item>
</argument>
</arguments>
</step>
Expand Down
Loading

0 comments on commit db8cabe

Please sign in to comment.