Add Tugboat configuration to enable live preview environments for merge requests.

Steps

  1. Create .tugboat/config.yml.
  2. Enable Tugboat integration on the project's GitLab settings.
  3. The preview environment should:
    • Use tugboatqa/drupal:11 and tugboatqa/mariadb images
    • Install the module via Composer path repository
    • Enable webform_workflows_element and its dependencies (workflows, webform)
    • Optionally enable submodules (webform_workflows_element_views, webform_workflows_element_maestro) if their dependencies are available

Proposed .tugboat/config.yml

services:
  php:
    image: tugboatqa/drupal:11
    default: true
    http: false
    depends: mysql
    commands:
      update: |
        set -eux
        cd $DRUPAL_COMPOSER_ROOT
        composer config minimum-stability dev
        composer config repositories.tugboat path $TUGBOAT_ROOT
        composer require drupal/webform_workflows_element
        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
        echo "\$settings['trusted_host_patterns'] = ['\.tugboatqa\.com\$'];" >> $DOCROOT/sites/default/settings.php
        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
        vendor/bin/drush --yes pm:enable webform_workflows_element
      build: |
        set -eux
        cd $DRUPAL_COMPOSER_ROOT
        composer install --optimize-autoloader
        composer update drupal/webform_workflows_element --with-all-dependencies
        vendor/bin/drush --yes updb
        vendor/bin/drush cache:rebuild
  mysql:
    image: tugboatqa/mariadb
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mably created an issue. See original summary.

mably’s picture

Status: Active » Needs review

  • mably committed 7f4bbfdc on 2.x
    task: #3576325 Enable Tugboat live previews
    
    By: mably
    
mably’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

mably changed the visibility of the branch 3576325-enable-tugboat-live to hidden.

mably changed the visibility of the branch 3576325-enable-tugboat-live to active.

mably changed the visibility of the branch 3576325-tugboat-workflow-lifecycle to hidden.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.