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

Economics sandbox #1663

Draft
wants to merge 8 commits into
base: develop
Choose a base branch
from
Draft
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
16 changes: 8 additions & 8 deletions .tugboat/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ services:
aliases:
- hs-colorful
- hs-traditional
- english
- economics

# A set of commands to run while building this service
commands:
Expand Down Expand Up @@ -52,7 +52,7 @@ services:
- drush @hs_traditional.local user:create tugboat --password=tugboat || true
- drush @hs_traditional.local user:role:add administrator tugboat || true

- blt drupal:sync:files --site=english
- blt drupal:sync:files --site=economics

- chown -R www-data:www-data ${TUGBOAT_ROOT}/docroot/sites/*/files
build:
Expand All @@ -68,9 +68,9 @@ services:
- drush @hs_traditional.local eval '\Drupal::moduleHandler()->loadInclude("user", "install");user_update_10000();'
- blt drupal:update --site=hs_traditional

- drush @english.local cr
- drush @english.local eval '\Drupal::moduleHandler()->loadInclude("user", "install");user_update_10000();'
- blt drupal:update --site=english
- drush @economics.local cr
- drush @economics.local eval '\Drupal::moduleHandler()->loadInclude("user", "install");user_update_10000();'
- blt drupal:update --site=economics

- npm run theme-build

Expand All @@ -90,20 +90,20 @@ services:
# Delete and recreate the database for each site.
- mysql -e "DROP DATABASE IF EXISTS hs_colorful; CREATE DATABASE hs_colorful;"
- mysql -e "DROP DATABASE IF EXISTS hs_traditional; CREATE DATABASE hs_traditional;"
- mysql -e "DROP DATABASE IF EXISTS english; CREATE DATABASE english;"
- mysql -e "DROP DATABASE IF EXISTS economics; CREATE DATABASE economics;"

# Give the tugboat user access to the new databases.
- mysql -e "GRANT ALL PRIVILEGES ON *.* TO 'tugboat'; FLUSH PRIVILEGES;"

# Download each database dump.
- scp [email protected]:/mnt/gfs/humscigryphon.prod/backups/prod-hs_colorful-humscigrydb423120-`date -d '8 hours ago' +%Y-%m-%d`.sql.gz /tmp/hs_colorful.sql.gz
- scp [email protected]:/mnt/gfs/humscigryphon.prod/backups/prod-hs_traditional-humscigrydb423132-`date -d '8 hours ago' +%Y-%m-%d`.sql.gz /tmp/hs_traditional.sql.gz
- scp [email protected]:/mnt/gfs/humscigryphon.prod/backups/prod-english-humscigrydb423084-`date -d '8 hours ago' +%Y-%m-%d`.sql.gz /tmp/english.sql.gz
- scp [email protected]:/mnt/gfs/humscigryphon.prod/backups/prod-economics-humscigrydb423080-`date -d '8 hours ago' +%Y-%m-%d`.sql.gz /tmp/economics.sql.gz

# Import each database dump into the associated table.
- zcat /tmp/hs_colorful.sql.gz | mysql hs_colorful
- zcat /tmp/hs_traditional.sql.gz | mysql hs_traditional
- zcat /tmp/english.sql.gz | mysql english
- zcat /tmp/economics.sql.gz | mysql economics

# Clean up after ourselves to keep the Preview size small.
- rm /tmp/*.sql.gz
Loading
Loading