This repository has been archived by the owner on Jun 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allows for better control of deployments. REF CIVIC-2795.
- Loading branch information
Showing
6 changed files
with
76 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
// NuCivic Data Starter | ||
$aliases['local'] = array( | ||
'profile' => 'dkan', | ||
'webroot' => 'docroot', | ||
'#name' => 'datastarter', | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
# | ||
# Cloud Hook: drush-env-switch | ||
# | ||
|
||
site=$1 | ||
env=$2 | ||
drush_alias=$site'.'$env | ||
target_env=$env | ||
|
||
echo "Target environment is $target_env" | ||
|
||
echo "Run pre deploy steps..." | ||
(drush @$drush_alias cc all && drush @$drush_alias rr) || (drush @$drush_alias updb -y 2>/dev/null && drush @$drush_alias rr) | ||
|
||
echo "Checking drupal boostrap." | ||
drupal=$(drush @$drush_alias status | grep -e "Drupal bootstrap" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') | ||
|
||
if [[ "$drupal" =~ "Successful" ]]; then | ||
echo "Installation detected, running deploy script" | ||
drush @$drush_alias -y fr --force custom_config | ||
drush @$drush_alias env-switch $target_env --force | ||
drush @$drush_alias -y updb | ||
DB_BASED_SEARCH=`drush @$drush_alias pmi dkan_acquia_search_solr | grep disabled` | ||
if [ -z "$DB_BASED_SEARCH" ]; then | ||
echo "SOLR Search, avoiding indexing data" | ||
else | ||
echo "DB Search, indexing data" | ||
drush @$drush_alias search-api-index datasets | ||
drush @$drush_alias search-api-index groups_di | ||
drush @$drush_alias search-api-index stories_index | ||
fi | ||
else | ||
echo "Installation not detected" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters