Commit 3302d8d7 authored by Yas Naoi's avatar Yas Naoi
Browse files

Issue #3262412 by yas: Fix a composer error while building the tugboat QA environment

parent 9908d019
Loading
Loading
Loading
Loading
+37 −13
Original line number Diff line number Diff line
@@ -21,14 +21,17 @@ services:
        composer config repositories.tugboat vcs $TUGBOAT_ROOT
        # Require Admin Toolbar
        composer require drupal/admin_toolbar
        # Require Bootstrap Cloud theme
        composer require drupal/bootstrap_cloud
        # Allow "minimum-stability": "dev" and "prefer-stable": true
        composer config minimum-stability dev
        composer config prefer-stable true
        # Now we can require drupal/cloud, specifing the branch name we created
        # above that uses the $TUGBOAT_REPO_ID environment variable.
        composer require drupal/cloud:dev-$TUGBOAT_REPO_ID
        # Set the $PATH for vendor/bin/drush
        export PATH=$PATH:./vendor/bin
        # Install Drupal on the site.
        # Use --db-url=mysql://tugboat:tugboat@mysql:3306/tugboat for mysql connection.
        vendor/bin/drush \
        drush \
          --yes \
          --db-url=sqlite://sites/default/files/db.sqlite \
          --site-name="Live preview for ${TUGBOAT_PREVIEW_NAME}" \
@@ -39,14 +42,25 @@ services:
        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 cloud aws_cloud cloud_cluster_worker docker gapps k8s openstack terraform vmware
        # Enable admin_toolbar Module.
        vendor/bin/drush --yes en admin_toolbar
        # Enable the theme.
        vendor/bin/drush --yes theme:enable bootstrap_cloud
        vendor/bin/drush --yes config:set system.theme default bootstrap_cloud
        vendor/bin/drush --yes config:set system.theme admin claro
        # Avoid an error: "Allowed memory size of 134217728 bytes exhausted"
        echo 'memory_limit = -1' >> /usr/local/etc/php/conf.d/my-php.ini
        # Enable the Cloud family modules.
        drush -y en cloud cloud_dashboard
        drush -y en aws_cloud gapps
        drush -y en k8s
        drush -y en openstack
        drush -y en terraform
        drush -y en vmware
        # Enable the other modules.
        drush -y en admin_toolbar
        drush -y en entity_export_csv
        drush -y en geocoder
        drush -y en simple_oauth
        # Enable the themes.
        drush -y theme:enable bootstrap_cloud
        drush -y theme:enable claro
        drush -y config:set system.theme default bootstrap_cloud
        drush -y config:set system.theme admin claro
      build: |
        set -eux
        # Delete and re-check out this branch in case this is built from a Base Preview.
@@ -55,10 +69,20 @@ services:
        cd $DRUPAL_COMPOSER_ROOT
        composer install --optimize-autoloader
        # Update installed modules.
        composer update aws/aws-sdk-php
        composer update drupal/admin_toolbar
        composer update drupal/bootstrap_cloud
        composer update drupal/cloud
        vendor/bin/drush --yes updb
        vendor/bin/drush cache:rebuild
        composer update drupal/entity_export_csv
        composer update drupal/geocoder
        composer update drupal/simple_oauth
        composer update google/apiclient
        composer update geocoder-php/nominatim-provider
        composer update maclof/kubernetes-client
        # Set the $PATH for vendor/bin/drush
        export PATH=$PATH:./vendor/bin
        # Update databases and clear cache.
        drush -y updb
        drush cache:rebuild
  # mysql:
  #   image: tugboatqa/mariadb