From fa960dfaedf434aa30e8399db5570a0d7c5c1702 Mon Sep 17 00:00:00 2001 From: ahughes3 <669850+ahughes3@users.noreply.github.com> Date: Tue, 5 Nov 2024 10:59:07 -0600 Subject: [PATCH] HSD8-1682: Add additional Tugboat previews and update Tugboat passwords (#1650) * HSD8-1682: Add additional Tugboat previews and update Tugboat passwords. --- .tugboat/config.yml | 33 +++- .../sites/history/settings/ci.settings.php | 155 ++++++++++++++++++ docroot/sites/west/settings/ci.settings.php | 155 ++++++++++++++++++ 3 files changed, 339 insertions(+), 4 deletions(-) create mode 100644 docroot/sites/history/settings/ci.settings.php create mode 100644 docroot/sites/west/settings/ci.settings.php diff --git a/.tugboat/config.yml b/.tugboat/config.yml index aa0b90251d..61021e47a5 100644 --- a/.tugboat/config.yml +++ b/.tugboat/config.yml @@ -18,6 +18,8 @@ services: - hs-colorful - hs-traditional - english + - history + - west # A set of commands to run while building this service commands: @@ -43,17 +45,23 @@ services: - rm -rf vendor - composer install --no-ansi - mysql -h mysql -P 3306 -u tugboat -ptugboat -e 'SET GLOBAL max_allowed_packet=67108864;' - # Sync to hs_colorful, hs_colorful and english database & files. + # Sync to hs_colorful, hs_colorful database & files and create user. - blt drupal:sync:files --site=hs_colorful - - drush @hs_colorful.local user:create tugboat --password=tugboat || true + - drush @hs_colorful.local user:create tugboat --password=pushcar || true - drush @hs_colorful.local user:role:add administrator tugboat || true - blt drupal:sync:files --site=hs_traditional - - drush @hs_traditional.local user:create tugboat --password=tugboat || true + - drush @hs_traditional.local user:create tugboat --password=pushcar || true - drush @hs_traditional.local user:role:add administrator tugboat || true - + + # Sync to english, history, and west database & files, does not create a user. - blt drupal:sync:files --site=english + - blt drupal:sync:files --site=history + + - blt drupal:sync:files --site=west + + - chown -R www-data:www-data ${TUGBOAT_ROOT}/docroot/sites/*/files build: - rm -rf vendor @@ -72,11 +80,22 @@ services: - drush @english.local eval '\Drupal::moduleHandler()->loadInclude("user", "install");user_update_10000();' - blt drupal:update --site=english + - drush @history.local cr + - drush @history.local eval '\Drupal::moduleHandler()->loadInclude("user", "install");user_update_10000();' + - blt drupal:update --site=history + + - drush @west.local cr + - drush @west.local eval '\Drupal::moduleHandler()->loadInclude("user", "install");user_update_10000();' + - blt drupal:update --site=west + - npm run theme-build # Collection of urls to compare visual results. urls: - / + - /mixed-pages/mixed-page-raised-cards + - /mixed-page-wells-raised-cards-full-width + - /mixed-pages/mixed-page-wells-raised-cards-full-width-sidebar # What to call the service hosting MySQL. This name also acts as the # hostname to access the service by from the php service. @@ -91,6 +110,8 @@ services: - 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 history; CREATE DATABASE history;" + - mysql -e "DROP DATABASE IF EXISTS west; CREATE DATABASE west;" # Give the tugboat user access to the new databases. - mysql -e "GRANT ALL PRIVILEGES ON *.* TO 'tugboat'; FLUSH PRIVILEGES;" @@ -99,11 +120,15 @@ services: - scp humscigryphon.prod@web-42199.prod.hosting.acquia.com:/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 humscigryphon.prod@web-42199.prod.hosting.acquia.com:/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 humscigryphon.prod@web-42199.prod.hosting.acquia.com:/mnt/gfs/humscigryphon.prod/backups/prod-english-humscigrydb423084-`date -d '8 hours ago' +%Y-%m-%d`.sql.gz /tmp/english.sql.gz + - scp humscigryphon.prod@web-42199.prod.hosting.acquia.com:/mnt/gfs/humscigryphon.prod/backups/prod-history-humscigrydb423116-`date -d '8 hours ago' +%Y-%m-%d`.sql.gz /tmp/history.sql.gz + - scp humscigryphon.prod@web-42199.prod.hosting.acquia.com:/mnt/gfs/humscigryphon.prod/backups/prod-west-humscigrydb423301-`date -d '8 hours ago' +%Y-%m-%d`.sql.gz /tmp/west.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/history.sql.gz | mysql history + - zcat /tmp/west.sql.gz | mysql west # Clean up after ourselves to keep the Preview size small. - rm /tmp/*.sql.gz diff --git a/docroot/sites/history/settings/ci.settings.php b/docroot/sites/history/settings/ci.settings.php new file mode 100644 index 0000000000..2ec53cfbce --- /dev/null +++ b/docroot/sites/history/settings/ci.settings.php @@ -0,0 +1,155 @@ + + [ + 'default' => + [ + 'database' => 'history', + 'username' => 'tugboat', + 'password' => 'tugboat', + 'host' => 'mysql', + 'port' => '3306', + 'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql', + 'driver' => 'mysql', + 'prefix' => '', + ], + ], + ]; +} + + +// Use development service parameters. +$settings['container_yamls'][] = EnvironmentDetector::getRepoRoot() . '/docroot/sites/development.services.yml'; +$settings['container_yamls'][] = EnvironmentDetector::getRepoRoot() . '/docroot/sites/blt.development.services.yml'; + +// Allow access to update.php. +$settings['update_free_access'] = TRUE; + +/** + * Assertions. + * + * The Drupal project primarily uses runtime assertions to enforce the + * expectations of the API by failing when incorrect calls are made by code + * under development. + * + * @see http://php.net/assert + * @see https://www.drupal.org/node/2492225 + * + * If you are using PHP 7.0 it is strongly recommended that you set + * zend.assertions=1 in the PHP.ini file (It cannot be changed from .htaccess + * or runtime) on development machines and to 0 in production. + * + * @see https://wiki.php.net/rfc/expectations + */ +assert_options(ASSERT_ACTIVE, TRUE); +assert_options(ASSERT_EXCEPTION, TRUE); + +/** + * Show all error messages, with backtrace information. + * + * In case the error level could not be fetched from the database, as for + * example the database connection failed, we rely only on this value. + */ +$config['system.logging']['error_level'] = 'verbose'; + +/** + * Disable CSS and JS aggregation. + */ +$config['system.performance']['css']['preprocess'] = FALSE; +$config['system.performance']['js']['preprocess'] = FALSE; + +/** + * Disable the render cache (this includes the page cache). + * + * Note: you should test with the render cache enabled, to ensure the correct + * cacheability metadata is present. However, in the early stages of + * development, you may want to disable it. + * + * This setting disables the render cache by using the Null cache back-end + * defined by the development.services.yml file above. + * + * Do not use this setting until after the site is installed. + */ +// $settings['cache']['bins']['render'] = 'cache.backend.null'; +/** + * Disable Dynamic Page Cache. + * + * Note: you should test with Dynamic Page Cache enabled, to ensure the correct + * cacheability metadata is present (and hence the expected behavior). However, + * in the early stages of development, you may want to disable it. + */ +// $settings['cache']['bins']['dynamic_page_cache'] = 'cache.backend.null'; +/** + * Allow test modules and themes to be installed. + * + * Drupal ignores test modules and themes by default for performance reasons. + * During development it can be useful to install test extensions for debugging + * purposes. + */ +$settings['extension_discovery_scan_tests'] = FALSE; + + +/** + * Configure static caches. + * + * Note: you should test with the config, bootstrap, and discovery caches + * enabled to test that metadata is cached as expected. However, in the early + * stages of development, you may want to disable them. Overrides to these bins + * must be explicitly set for each bin to change the default configuration + * provided by Drupal core in core.services.yml. + * See https://www.drupal.org/node/2754947 + */ + +// $settings['cache']['bins']['bootstrap'] = 'cache.backend.null'; +// $settings['cache']['bins']['discovery'] = 'cache.backend.null'; +// $settings['cache']['bins']['config'] = 'cache.backend.null'; +/** + * Enable access to rebuild.php. + * + * This setting can be enabled to allow Drupal's php and database cached + * storage to be cleared via the rebuild.php page. Access to this page can also + * be gained by generating a query string from rebuild_token_calculator.sh and + * using these parameters in a request to rebuild.php. + */ +$settings['rebuild_access'] = FALSE; + +/** + * Skip file system permissions hardening. + * + * The system module will periodically check the permissions of your site's + * site directory to ensure that it is not writable by the website user. For + * sites that are managed with a version control system, this can cause problems + * when files in that directory such as settings.php are updated, because the + * user pulling in the changes won't have permissions to modify files in the + * directory. + */ +$settings['skip_permissions_hardening'] = TRUE; + +/** + * Files paths. + */ +$settings['file_private_path'] = EnvironmentDetector::getRepoRoot() . '/files-private/default'; +/** + * Site path. + * + * @var $site_path + * This is always set and exposed by the Drupal Kernel. + */ +// phpcs:ignore +$settings['file_public_path'] = 'sites/' . EnvironmentDetector::getSiteName($site_path) . '/files'; + +/** + * Trusted host configuration. + * + * See full description in default.settings.php. + */ +$settings['trusted_host_patterns'] = [ + '^.+$', +]; diff --git a/docroot/sites/west/settings/ci.settings.php b/docroot/sites/west/settings/ci.settings.php new file mode 100644 index 0000000000..726a3bf213 --- /dev/null +++ b/docroot/sites/west/settings/ci.settings.php @@ -0,0 +1,155 @@ + + [ + 'default' => + [ + 'database' => 'west', + 'username' => 'tugboat', + 'password' => 'tugboat', + 'host' => 'mysql', + 'port' => '3306', + 'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql', + 'driver' => 'mysql', + 'prefix' => '', + ], + ], + ]; +} + + +// Use development service parameters. +$settings['container_yamls'][] = EnvironmentDetector::getRepoRoot() . '/docroot/sites/development.services.yml'; +$settings['container_yamls'][] = EnvironmentDetector::getRepoRoot() . '/docroot/sites/blt.development.services.yml'; + +// Allow access to update.php. +$settings['update_free_access'] = TRUE; + +/** + * Assertions. + * + * The Drupal project primarily uses runtime assertions to enforce the + * expectations of the API by failing when incorrect calls are made by code + * under development. + * + * @see http://php.net/assert + * @see https://www.drupal.org/node/2492225 + * + * If you are using PHP 7.0 it is strongly recommended that you set + * zend.assertions=1 in the PHP.ini file (It cannot be changed from .htaccess + * or runtime) on development machines and to 0 in production. + * + * @see https://wiki.php.net/rfc/expectations + */ +assert_options(ASSERT_ACTIVE, TRUE); +assert_options(ASSERT_EXCEPTION, TRUE); + +/** + * Show all error messages, with backtrace information. + * + * In case the error level could not be fetched from the database, as for + * example the database connection failed, we rely only on this value. + */ +$config['system.logging']['error_level'] = 'verbose'; + +/** + * Disable CSS and JS aggregation. + */ +$config['system.performance']['css']['preprocess'] = FALSE; +$config['system.performance']['js']['preprocess'] = FALSE; + +/** + * Disable the render cache (this includes the page cache). + * + * Note: you should test with the render cache enabled, to ensure the correct + * cacheability metadata is present. However, in the early stages of + * development, you may want to disable it. + * + * This setting disables the render cache by using the Null cache back-end + * defined by the development.services.yml file above. + * + * Do not use this setting until after the site is installed. + */ +// $settings['cache']['bins']['render'] = 'cache.backend.null'; +/** + * Disable Dynamic Page Cache. + * + * Note: you should test with Dynamic Page Cache enabled, to ensure the correct + * cacheability metadata is present (and hence the expected behavior). However, + * in the early stages of development, you may want to disable it. + */ +// $settings['cache']['bins']['dynamic_page_cache'] = 'cache.backend.null'; +/** + * Allow test modules and themes to be installed. + * + * Drupal ignores test modules and themes by default for performance reasons. + * During development it can be useful to install test extensions for debugging + * purposes. + */ +$settings['extension_discovery_scan_tests'] = FALSE; + + +/** + * Configure static caches. + * + * Note: you should test with the config, bootstrap, and discovery caches + * enabled to test that metadata is cached as expected. However, in the early + * stages of development, you may want to disable them. Overrides to these bins + * must be explicitly set for each bin to change the default configuration + * provided by Drupal core in core.services.yml. + * See https://www.drupal.org/node/2754947 + */ + +// $settings['cache']['bins']['bootstrap'] = 'cache.backend.null'; +// $settings['cache']['bins']['discovery'] = 'cache.backend.null'; +// $settings['cache']['bins']['config'] = 'cache.backend.null'; +/** + * Enable access to rebuild.php. + * + * This setting can be enabled to allow Drupal's php and database cached + * storage to be cleared via the rebuild.php page. Access to this page can also + * be gained by generating a query string from rebuild_token_calculator.sh and + * using these parameters in a request to rebuild.php. + */ +$settings['rebuild_access'] = FALSE; + +/** + * Skip file system permissions hardening. + * + * The system module will periodically check the permissions of your site's + * site directory to ensure that it is not writable by the website user. For + * sites that are managed with a version control system, this can cause problems + * when files in that directory such as settings.php are updated, because the + * user pulling in the changes won't have permissions to modify files in the + * directory. + */ +$settings['skip_permissions_hardening'] = TRUE; + +/** + * Files paths. + */ +$settings['file_private_path'] = EnvironmentDetector::getRepoRoot() . '/files-private/default'; +/** + * Site path. + * + * @var $site_path + * This is always set and exposed by the Drupal Kernel. + */ +// phpcs:ignore +$settings['file_public_path'] = 'sites/' . EnvironmentDetector::getSiteName($site_path) . '/files'; + +/** + * Trusted host configuration. + * + * See full description in default.settings.php. + */ +$settings['trusted_host_patterns'] = [ + '^.+$', +];