Skip to content

Commit

Permalink
9.2.1
Browse files Browse the repository at this point in the history
- HSD8-1077 Allow site managers ability to build unpublished menu items (#913)
- HSD8-1093 Fixed group blocks that have empty content
- Updated dependencies Jun 30 2021
- Improved Certificate command by disabling any existing certs before enabling the new one
  • Loading branch information
pookmish authored Jul 6, 2021
2 parents da61878 + c201580 commit 1f5e93d
Show file tree
Hide file tree
Showing 10 changed files with 142 additions and 82 deletions.
20 changes: 16 additions & 4 deletions blt/src/Blt/Plugin/Commands/HsAcquiaApiCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,11 @@ public function backupDatabases($options = ['start-at' => NULL]) {
*
* @options exclude Comma separated list of database names to skip.
*/
public function syncStaging(array $options = ['exclude' => NULL]) {
public function syncStaging(array $options = [
'exclude' => NULL,
'resume' => FALSE,
'env' => 'test'
]) {
$task_started = time() - (60 * 60 * 24);
$this->connectAcquiaApi();

Expand All @@ -120,7 +124,7 @@ public function syncStaging(array $options = ['exclude' => NULL]) {

foreach ($copy_sites as $site) {
$this->say("Copying $site database to staging.");
$this->acquiaDatabases->copy($this->getEnvironmentUuid('prod'), $site, $this->getEnvironmentUuid('test'));
$this->acquiaDatabases->copy($this->getEnvironmentUuid('prod'), $site, $this->getEnvironmentUuid($options['env']));
}

while (!empty($sites)) {
Expand All @@ -137,7 +141,7 @@ public function syncStaging(array $options = ['exclude' => NULL]) {
$copy_sites[$db_position] = $new_site;
$this->say("Copying $new_site database to staging.");
$this->connectAcquiaApi();
$this->say($this->acquiaDatabases->copy($this->getEnvironmentUuid('prod'), $new_site, $this->getEnvironmentUuid('test'))->message);
$this->say($this->acquiaDatabases->copy($this->getEnvironmentUuid('prod'), $new_site, $this->getEnvironmentUuid($options['env']))->message);
}
}
}
Expand Down Expand Up @@ -232,16 +236,24 @@ protected function getSitesToSync($task_started, array $options) {

$sites = $this->getConfigValue('multisites');
foreach ($sites as $key => &$db_name) {
$db_name = $db_name == 'default' ? 'swshumsci' : $db_name;
$db_name = $db_name == 'default' ? 'humscigryphon' : $db_name;

if (strpos($db_name, 'sandbox') !== FALSE) {
unset($sites[$key]);
}
}
$sites = array_values($sites);
if (!empty($options['exclude'])) {
$exclude = explode(',', $options['exclude']);
$sites = array_diff($sites, $exclude);
}

if ($options['resume']) {
asort($finished_databases);
$last_database = end($finished_databases);
$last_db_position = array_search($last_database, $sites);
$sites = array_slice($sites, $last_db_position);
}
return array_diff($sites, $finished_databases);
}

Expand Down
8 changes: 6 additions & 2 deletions blt/src/Blt/Plugin/Commands/HsCertCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,14 +187,18 @@ public function updateCert($environment) {
/** @var \AcquiaCloudApi\Response\SslCertificateResponse $cert */
foreach ($this->acquiaCertificates->getAll($environmentUuid) as $cert) {
if ($cert->label == $label) {
$this->say($this->acquiaCertificates->enable($environmentUuid, $cert->id)->message);
$enable_cert = $cert->id;
}

if ($cert->flags->active) {
$this->say($this->acquiaCertificates->disable($environmentUuid, $cert->id)->message);
}

if (strtotime($cert->expires_at) < time()) {
$this->say($this->acquiaCertificates->delete($environmentUuid, $cert->id)->message);
}
}

$this->say($this->acquiaCertificates->enable($environmentUuid, $enable_cert)->message);
$this->taskDeleteDir($this->getConfigValue('repo.root') . '/certs')->run();
}

Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@
"https://www.drupal.org/project/config_ignore/issues/2865419": "https://www.drupal.org/files/issues/2020-07-20/config_ignore-wildcard_force_import.patch"
},
"drupal/core": {
"https://www.drupal.org/project/drupal/issues/2807629": "https://www.drupal.org/files/issues/2021-04-20/2807629-39.patch",
"https://www.drupal.org/project/drupal/issues/2999491": "https://www.drupal.org/files/issues/2020-10-06/2999491--reusable-title-display--56.patch",
"https://www.drupal.org/project/drupal/issues/2981837": "https://www.drupal.org/files/issues/2019-05-22/findMigrationDependencies-null-process-value-2981837-5.patch",
"https://www.drupal.org/project/drupal/issues/2925297": "https://www.drupal.org/files/issues/2019-09-26/core-typed_config_handle_missing_config-2925297-18.patch",
Expand Down
Loading

0 comments on commit 1f5e93d

Please sign in to comment.