Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run ACMS commands in ORCA fixture creation #650

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/orca.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
# Testing Drupal 10 in php 8.3.
- orca-job: ISOLATED_TEST_ON_CURRENT
php-version: "8.3"
orca-enable-nightwatch: "TRUE"
orca-enable-nightwatch: "FALSE"
# Testing coverage generation in CLOVER format.
orca-coverage-clover-enable: "TRUE"

Expand Down
2 changes: 2 additions & 0 deletions bin/ci/_includes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ export DRUPAL_TEST_WEBDRIVER_CHROME_ARGS="--disable-gpu --headless --no-sandbox"
export DRUPAL_TEST_WEBDRIVER_HOSTNAME="localhost"
export DRUPAL_TEST_WEBDRIVER_PORT="4444"
export DRUPAL_NIGHTWATCH_SEARCH_DIRECTORY=../../
export SITESTUDIO_API_KEY="key-cohesion-baseline"
export SITESTUDIO_ORG_KEY="test-cohesion-baseline"

if [[ "$GITLAB_CI" ]]; then
# In Gitlab we are using a separate container to run ChromeDriver on port 9515.
Expand Down
43 changes: 18 additions & 25 deletions config/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,33 +51,26 @@
# example.

# Removed due to outage caused by ACMS on 06/26/2024.
#acquia/acquia_cms:
# core_matrix:
# 10.3.x:
# version: ~
# version_dev: ~
# '*':
# version: 2.x
# version_dev: 2.x-dev
acquia/acquia_cms:
core_matrix:
version: 2.x
version_dev: 2.x-dev

# Removed due to outage caused by ACMS on 06/26/2024.
#drupal/acquia_cms_common:
# core_matrix:
# 10.3.x:
# version: ~
# version_dev: ~
# '>=10.2.2':
# version: 3.3.x
# version_dev: 3.3.x-dev
# 10.1.x:
# version: 3.2.x
# version_dev: 3.2.x-dev
# '>=10.0.9 <10.1':
# version: 3.1.x
# version_dev: 3.1.x-dev
# '>=9.5.10 <10.0.9':
# version: 2.x
# version_dev: 2.x-dev
drupal/acquia_cms_common:
core_matrix:
'>=10.2.2':
version: 3.3.x
version_dev: 3.3.x-dev
10.1.x:
version: 3.2.x
version_dev: 3.2.x-dev
'>=10.0.9 <10.1':
version: 3.1.x
version_dev: 3.1.x-dev
'>=9.5.10 <10.0.9':
version: 2.x
version_dev: 2.x-dev

drupal/acquia_connector:
version: 4.x
Expand Down
14 changes: 14 additions & 0 deletions src/Domain/Fixture/FixtureCreator.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ public function create(FixtureOptions $options): void {
$this->installSite();
$this->setUpFilesDirectories();
$this->customizeFixture();
$this->runAcmsCommands();
$this->createAndCheckoutBackupTag();
$this->displaySecurityVulnerabilityAdvisories();
$this->displayStatus();
Expand Down Expand Up @@ -978,4 +979,17 @@ private function displaySecurityVulnerabilityAdvisories(): void {
}
}

/**
* Runs ACMS commands.
*/
public function runAcmsCommands(): void {
if ($this->fixtureInspector->getInstalledPackageVersionPretty('acquia/acquia_cms') === '~') {
return;
}
$this->output->section('Run ACMS Site Build');
$this->processRunner->runFixtureVendorBin(['acms', 'acms:build', 'acquia_cms_community', '--no-interaction']);
$this->output->section('Run ACMS Site Install');
$this->processRunner->runFixtureVendorBin(['acms', 'site:install', 'acquia_cms_community', '--no-interaction']);
}

}
8 changes: 8 additions & 0 deletions src/Enum/EnvVarEnum.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
* @method static EnvVarEnum DRUPAL_TEST_WEBDRIVER_CHROME_ARGS()
* @method static EnvVarEnum DRUPAL_TEST_WEBDRIVER_HOSTNAME()
* @method static EnvVarEnum DRUPAL_TEST_WEBDRIVER_PORT()
* @method static EnvVarEnum SITESTUDIO_API_KEY()
* @method static EnvVarEnum SITESTUDIO_ORG_KEY()
*/
class EnvVarEnum extends Enum {

Expand Down Expand Up @@ -106,6 +108,10 @@ class EnvVarEnum extends Enum {

public const DRUPAL_TEST_WEBDRIVER_PORT = 'DRUPAL_TEST_WEBDRIVER_PORT';

public const SITESTUDIO_API_KEY = 'SITESTUDIO_API_KEY';

public const SITESTUDIO_ORG_KEY = 'SITESTUDIO_ORG_KEY';

/**
* Descriptions for the environment variables.
*
Expand Down Expand Up @@ -147,6 +153,8 @@ public static function descriptions(): array {
self::DRUPAL_TEST_WEBDRIVER_CHROME_ARGS => 'The Chrome WebDriver arguments (Read-only)',
self::DRUPAL_TEST_WEBDRIVER_HOSTNAME => 'The WebDriver hostname (Read-only)',
self::DRUPAL_TEST_WEBDRIVER_PORT => 'The WebDriver port (Read-only)',
self::SITESTUDIO_API_KEY => 'The Site Studio API Key',
self::SITESTUDIO_ORG_KEY => 'The Site Studio ORG Key',
];
}

Expand Down
Loading