Skip to content

Commit

Permalink
Fixes acquia#1324: Add ah_other config split.
Browse files Browse the repository at this point in the history
  • Loading branch information
grasmash committed Apr 6, 2017
1 parent 7c0ffdc commit 7a9522b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
15 changes: 8 additions & 7 deletions readme/configuration-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,14 @@ BLT and Config Split together make it easy to capture configuration changes in c

BLT automatically enables the following config splits in the following environments:

| Split | Environment
|-------|----------------------------------------------
| local | any non-Acquia, non-Travis environment
| ci | Acquia Pipelines OR Travis CI
| dev | Acquia Dev
| stage | Acquia Staging
| prod | Acquia Prod
| Split | Environment
|----------|----------------------------------------------
| local | any non-Acquia, non-Travis environment
| ci | Acquia Pipelines OR Travis CI
| dev | Acquia Dev
| stage | Acquia Staging
| prod | Acquia Prod
| ah_other | any Acquia environment not listed above

As a prerequisite, make sure your BLT-based project is set up to use Config Split (see section above).

Expand Down
10 changes: 9 additions & 1 deletion settings/config.settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
$config['config_split.config_split.prod']['status'] = FALSE;
$config['config_split.config_split.ci']['status'] = FALSE;

// Non-acquia envs.
if ($is_local_env) {
if (getenv('TRAVIS') || getenv('PIPELINE_ENV')) {
$split = 'ci';
Expand All @@ -27,7 +28,8 @@
}
}
}
else {
// Acquia only envs.
elseif ($is_ah_env) {
$config_directories['vcs'] = $config_directories['sync'];

if ($is_ah_dev_env) {
Expand All @@ -48,4 +50,10 @@
$config["$split_filename_prefix.$split"]['status'] = TRUE;
}
}
else {
$split = 'ah_other';
if (file_exists("$split_filepath_prefix.$split.yml")) {
$config["$split_filename_prefix.$split"]['status'] = TRUE;
}
}
}

0 comments on commit 7a9522b

Please sign in to comment.