From d9485633baaef36ef93829da197e314fd01847c8 Mon Sep 17 00:00:00 2001 From: Oleksandr Shmyheliuk Date: Tue, 5 Sep 2023 09:42:17 -0500 Subject: [PATCH] CEXT-2220: Add support for deployments on Commerce Cloud (#120) * CEXT-2220: Add support for deployments on Commerce Cloud --- config/schema.error.yaml | 4 ++-- config/schema.yaml | 2 +- dist/error-codes.md | 4 ++-- src/Step/Build/EnableEventing.php | 2 +- src/Step/Build/EnableWebhooks.php | 12 ++++++------ 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/config/schema.error.yaml b/config/schema.error.yaml index 23e65fdce..2f54cf7d1 100644 --- a/config/schema.error.yaml +++ b/config/schema.error.yaml @@ -441,12 +441,12 @@ stage: general type: critical !php/const Magento\MagentoCloud\App\Error::GLOBAL_WEBHOOKS_MODULE_GENERATE_FAILED: - title: 'Unable to generate a module for commerce webhooks' + title: 'Failed to generate the AdobeCommerceWebhookPlugins module' suggestion: 'Check the `cloud.log` for more information.' stage: general type: critical !php/const Magento\MagentoCloud\App\Error::GLOBAL_WEBHOOKS_MODULE_ENABLEMENT_FAILED: - title: 'Unable to enable a module for commerce webhooks' + title: 'Failed to enable the AdobeCommerceWebhookPlugins module' suggestion: 'Check the `cloud.log` for more information.' stage: general type: critical diff --git a/config/schema.yaml b/config/schema.yaml index ab0342534..c9ac513cd 100644 --- a/config/schema.yaml +++ b/config/schema.yaml @@ -718,7 +718,7 @@ variables: global: ENABLE_EVENTING: true ENABLE_WEBHOOKS: - description: Enables commerce webhooks. + description: Enables Commerce webhooks. type: boolean stages: - global diff --git a/dist/error-codes.md b/dist/error-codes.md index 2a533fb30..1f41b718f 100644 --- a/dist/error-codes.md +++ b/dist/error-codes.md @@ -102,8 +102,8 @@ Critical errors indicate a problem with the Commerce on cloud infrastructure pro | 246 | | Unable to read the `.schema.yaml` file | | | 247 | | Unable to generate a module for eventing | Check the `cloud.log` for more information. | | 248 | | Unable to enable a module for eventing | Check the `cloud.log` for more information. | -| 249 | | Unable to generate a module for commerce webhooks | Check the `cloud.log` for more information. | -| 250 | | Unable to enable a module for commerce webhooks | Check the `cloud.log` for more information. | +| 249 | | Failed to generate the AdobeCommerceWebhookPlugins module | Check the `cloud.log` for more information. | +| 250 | | Failed to enable the AdobeCommerceWebhookPlugins module | Check the `cloud.log` for more information. | ## Warning Errors diff --git a/src/Step/Build/EnableEventing.php b/src/Step/Build/EnableEventing.php index 2dcc2f2a4..bac7e0fc4 100644 --- a/src/Step/Build/EnableEventing.php +++ b/src/Step/Build/EnableEventing.php @@ -75,7 +75,7 @@ public function execute() } catch (ShellException $e) { $this->logger->error( 'Failed to generate the Magento_AdobeCommerceEvents module. ' . - 'Refer to the eventing documentation to determine if all required modules are have been installed. ' . + 'Refer to the eventing documentation to determine if all required modules have been installed. ' . 'Error: ' . $e->getMessage() ); throw new StepException($e->getMessage(), Error::GLOBAL_EVENTING_MODULE_GENERATE_FAILED, $e); diff --git a/src/Step/Build/EnableWebhooks.php b/src/Step/Build/EnableWebhooks.php index 4f1c5ee67..4db26943f 100644 --- a/src/Step/Build/EnableWebhooks.php +++ b/src/Step/Build/EnableWebhooks.php @@ -55,7 +55,7 @@ public function __construct( } /** - * Generates and enables a module for commerce webhooks + * Generates and enables a module for Commerce webhooks * if @see StageConfigInterface::VAR_ENABLE_WEBHOOKS set to true * * {@inheritDoc} @@ -71,23 +71,23 @@ public function execute() } try { - $this->logger->notice('Generating module for commerce webhooks'); + $this->logger->notice('Generating module for Commerce webhooks'); $this->magentoShell->execute('webhooks:generate:module'); } catch (ShellException $e) { $this->logger->error( 'Failed to generate the AdobeCommerceWebhookPlugins module. ' . - 'Refer to the commerce webhooks documentation to determine if all ' . - 'required modules are have been installed. ' . + 'Refer to the Commerce webhooks documentation to determine if all ' . + 'required modules have been installed. ' . 'Error: ' . $e->getMessage() ); throw new StepException($e->getMessage(), Error::GLOBAL_WEBHOOKS_MODULE_GENERATE_FAILED, $e); } try { - $this->logger->notice('Enabling module for commerce webhooks'); + $this->logger->notice('Enabling module for Commerce webhooks'); $this->magentoShell->execute('module:enable Magento_AdobeCommerceWebhookPlugins'); } catch (ShellException $e) { - $this->logger->error('Failed to enable module for commerce webhooks: ' . $e->getMessage()); + $this->logger->error('Failed to enable module for Commerce webhooks: ' . $e->getMessage()); throw new StepException($e->getMessage(), Error::GLOBAL_WEBHOOKS_MODULE_ENABLEMENT_FAILED, $e); } }