Skip to content

Commit 7e35cff

Browse files
committed
RCAT-572 : Run ACMS commands in ORCA fixture creation
1 parent e0be1fc commit 7e35cff

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

bin/ci/_includes.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ export DRUPAL_TEST_WEBDRIVER_CHROME_ARGS="--disable-gpu --headless --no-sandbox"
7777
export DRUPAL_TEST_WEBDRIVER_HOSTNAME="localhost"
7878
export DRUPAL_TEST_WEBDRIVER_PORT="4444"
7979
export DRUPAL_NIGHTWATCH_SEARCH_DIRECTORY=../../
80+
export SITESTUDIO_API_KEY="key-cohesion-baseline"
81+
export SITESTUDIO_ORG_KEY="test-cohesion-baseline"
8082

8183
if [[ "$GITLAB_CI" ]]; then
8284
# In Gitlab we are using a separate container to run ChromeDriver on port 9515.

src/Domain/Fixture/FixtureCreator.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ public function create(FixtureOptions $options): void {
239239
$this->installSite();
240240
$this->setUpFilesDirectories();
241241
$this->customizeFixture();
242+
$this->runAcmsCommands();
242243
$this->createAndCheckoutBackupTag();
243244
$this->displaySecurityVulnerabilityAdvisories();
244245
$this->displayStatus();
@@ -978,4 +979,16 @@ private function displaySecurityVulnerabilityAdvisories(): void {
978979
}
979980
}
980981

982+
/**
983+
* Runs ACMS commands.
984+
*/
985+
public function runAcmsCommands(): void {
986+
// if ($this->fixtureInspector->getInstalledPackageVersionPretty('acquia/acquia_cms') === '~') {
987+
// return;
988+
// }
989+
$this->output->section('Run ACMS Site Build');
990+
$this->processRunner->runFixtureVendorBin(['acms', 'acms:build', 'acquia_cms_community', '--no-interaction']);
991+
$this->output->section('Run ACMS Site Install');
992+
$this->processRunner->runFixtureVendorBin(['acms', 'site:install', 'acquia_cms_community', '--no-interaction']);
993+
}
981994
}

src/Enum/EnvVarEnum.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
* @method static EnvVarEnum DRUPAL_TEST_WEBDRIVER_CHROME_ARGS()
3737
* @method static EnvVarEnum DRUPAL_TEST_WEBDRIVER_HOSTNAME()
3838
* @method static EnvVarEnum DRUPAL_TEST_WEBDRIVER_PORT()
39+
* @method static EnvVarEnum SITESTUDIO_API_KEY()
40+
* @method static EnvVarEnum SITESTUDIO_ORG_KEY()
3941
*/
4042
class EnvVarEnum extends Enum {
4143

@@ -106,6 +108,10 @@ class EnvVarEnum extends Enum {
106108

107109
public const DRUPAL_TEST_WEBDRIVER_PORT = 'DRUPAL_TEST_WEBDRIVER_PORT';
108110

111+
public const SITESTUDIO_API_KEY = 'SITESTUDIO_API_KEY';
112+
113+
public const SITESTUDIO_ORG_KEY = 'SITESTUDIO_ORG_KEY';
114+
109115
/**
110116
* Descriptions for the environment variables.
111117
*
@@ -147,6 +153,8 @@ public static function descriptions(): array {
147153
self::DRUPAL_TEST_WEBDRIVER_CHROME_ARGS => 'The Chrome WebDriver arguments (Read-only)',
148154
self::DRUPAL_TEST_WEBDRIVER_HOSTNAME => 'The WebDriver hostname (Read-only)',
149155
self::DRUPAL_TEST_WEBDRIVER_PORT => 'The WebDriver port (Read-only)',
156+
self::SITESTUDIO_API_KEY => 'The Site Studio API Key',
157+
self::SITESTUDIO_ORG_KEY => 'The Site Studio ORG Key',
150158
];
151159
}
152160

0 commit comments

Comments
 (0)