Skip to content

Commit

Permalink
CEXT-2220: Add support for deployments on Commerce Cloud (#120)
Browse files Browse the repository at this point in the history
* CEXT-2220: Add support for deployments on Commerce Cloud
  • Loading branch information
oshmyheliuk authored Sep 5, 2023
1 parent 19254a9 commit d948563
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions config/schema.error.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion config/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ variables:
global:
ENABLE_EVENTING: true
ENABLE_WEBHOOKS:
description: Enables commerce webhooks.
description: Enables Commerce webhooks.
type: boolean
stages:
- global
Expand Down
4 changes: 2 additions & 2 deletions dist/error-codes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/Step/Build/EnableEventing.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
12 changes: 6 additions & 6 deletions src/Step/Build/EnableWebhooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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);
}
}
Expand Down

0 comments on commit d948563

Please sign in to comment.