From a397619d45f2ae422cc34168a6c430a87728d4c1 Mon Sep 17 00:00:00 2001 From: Steve Wirt <40593-swirtMiles@users.noreply.drupalcode.org> Date: Wed, 12 Mar 2025 15:18:04 +0000 Subject: [PATCH 1/4] #3512501 Add Tugboat MR previews --- .tugboat/config.yml | 46 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .tugboat/config.yml diff --git a/.tugboat/config.yml b/.tugboat/config.yml new file mode 100644 index 0000000..d32ac05 --- /dev/null +++ b/.tugboat/config.yml @@ -0,0 +1,46 @@ +services: + php: + # Specify the version of Drupal you wish to use for Tugboat below. + image: tugboatqa/drupal:11 + default: true + http: false + depends: mysql + commands: + update: | + set -eux + # This is an environment variable we added in the Dockerfile that + # provides the path to Drupal composer root (not the web root). + cd $DRUPAL_COMPOSER_ROOT + # We need to change the minimum stability to dev to use the path + composer config minimum-stability dev + # We configure the Drupal project to use the checkout of the module as a + # Composer package repository. + composer config repositories.tugboat path $TUGBOAT_ROOT + # Now we can require this module + composer require drupal/migrate_boost + # Install Drupal on the site. + vendor/bin/drush \ + --yes \ + --db-url=mysql://tugboat:tugboat@mysql:3306/tugboat \ + --site-name="Live preview for ${TUGBOAT_PREVIEW_NAME}" \ + --account-pass=admin \ + site:install standard + # Add tugboat URLs to the Drupal trusted host patterns. + echo "\$settings['trusted_host_patterns'] = ['\.tugboatqa\.com\$'];" >> $DOCROOT/sites/default/settings.php + # Set up the files directory permissions. + mkdir -p $DRUPAL_DOCROOT/sites/default/files + chgrp -R www-data $DRUPAL_DOCROOT/sites/default/files + chmod 2775 $DRUPAL_DOCROOT/sites/default/files + chmod -R g+w $DRUPAL_DOCROOT/sites/default/files + # Enable the module. + vendor/bin/drush --yes pm:enable migrate_boost + build: | + set -eux + cd $DRUPAL_COMPOSER_ROOT + composer install --optimize-autoloader + # Update this module, including all dependencies. + composer update drupal/migrate_boost --with-all-dependencies + vendor/bin/drush --yes updb + vendor/bin/drush cache:rebuild + mysql: + image: tugboatqa/mariadb \ No newline at end of file -- GitLab From d1aa31fe3aa857664956b69ba3a0fe48a8b19917 Mon Sep 17 00:00:00 2001 From: Steve Wirt <40593-swirtMiles@users.noreply.drupalcode.org> Date: Thu, 20 Mar 2025 21:15:13 +0000 Subject: [PATCH 2/4] Add migration related support to run migration. --- .tugboat/config.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.tugboat/config.yml b/.tugboat/config.yml index d32ac05..ecc544d 100644 --- a/.tugboat/config.yml +++ b/.tugboat/config.yml @@ -18,6 +18,9 @@ services: composer config repositories.tugboat path $TUGBOAT_ROOT # Now we can require this module composer require drupal/migrate_boost + composer require drupal/migrate_tools --with-dependencies + composer require drupal/migrate_plus --with-dependencies + composer require drupal/pathautp --with-dependencies # Install Drupal on the site. vendor/bin/drush \ --yes \ @@ -34,6 +37,11 @@ services: chmod -R g+w $DRUPAL_DOCROOT/sites/default/files # Enable the module. vendor/bin/drush --yes pm:enable migrate_boost + vendor/bin/drush --yes pm:enable migrate_tools + vendor/bin/drush --yes pm:enable migrate_plus + vendor/bin/drush --yes pm:enable migrate_example + vendor/bin/drush --yes pm:enable migrate_example_setup + vendor/bin/drush --yes pm:enable pathauto build: | set -eux cd $DRUPAL_COMPOSER_ROOT @@ -42,5 +50,6 @@ services: composer update drupal/migrate_boost --with-all-dependencies vendor/bin/drush --yes updb vendor/bin/drush cache:rebuild + vendor/bin/drush drush migrate-import --group=beer mysql: image: tugboatqa/mariadb \ No newline at end of file -- GitLab From fd8de5e7629a2bce022cfe41c1398e6cc9ac3186 Mon Sep 17 00:00:00 2001 From: Steve Wirt <40593-swirtMiles@users.noreply.drupalcode.org> Date: Thu, 20 Mar 2025 21:20:28 +0000 Subject: [PATCH 3/4] Fix typo --- .tugboat/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.tugboat/config.yml b/.tugboat/config.yml index ecc544d..a7adc6c 100644 --- a/.tugboat/config.yml +++ b/.tugboat/config.yml @@ -20,7 +20,7 @@ services: composer require drupal/migrate_boost composer require drupal/migrate_tools --with-dependencies composer require drupal/migrate_plus --with-dependencies - composer require drupal/pathautp --with-dependencies + composer require drupal/pathauto --with-dependencies # Install Drupal on the site. vendor/bin/drush \ --yes \ -- GitLab From b357887a61c70709382d305b2c0d22947b065d05 Mon Sep 17 00:00:00 2001 From: Steve Wirt <40593-swirtMiles@users.noreply.drupalcode.org> Date: Thu, 20 Mar 2025 21:23:11 +0000 Subject: [PATCH 4/4] Remove extraneous drush --- .tugboat/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.tugboat/config.yml b/.tugboat/config.yml index a7adc6c..dd598e4 100644 --- a/.tugboat/config.yml +++ b/.tugboat/config.yml @@ -50,6 +50,6 @@ services: composer update drupal/migrate_boost --with-all-dependencies vendor/bin/drush --yes updb vendor/bin/drush cache:rebuild - vendor/bin/drush drush migrate-import --group=beer + vendor/bin/drush migrate-import --group=beer mysql: image: tugboatqa/mariadb \ No newline at end of file -- GitLab