Drupal Plugin



Search Results

The Probo.CI Drupal plugin provides an easy way to set Drupal site configuration options in your application build and quickly integrate a Drupal website’s repository. To use the Probo.CI Drupal plugin you must declare plugin: Drupal in your .probo.yaml file. The Drupal plugin’s parameters can automate some steps specific to Drupal such as composer setup, configuration import, running database updates, rebuilding caches, or performing other build configuration steps.

The Probo.CI Drupal plugin inherits all Probo PHP/LAMP configuration options. This allows additional Probo.CI Build steps in your .probo.yaml file to layer LAMP configuration options and commands on top of the Drupal site specific configuration.

See the Probo.CI Drupal Examples and Demonstrations section below for YAML config examples specific to Drupal. We can also help you get started building your .probo.yaml file.

The Drupal plugin requires Drush to install a Drupal site. For Drupal 8 and higher, Drush must be installed as a Composer dependency of your application. See our Using Drush documentation for instructions. For Drupal 7, Probo installs Drush 8 for you. See Drush for Drupal 7.

Directory Configuration

  • configSyncDirectory {string}

    Specify the location of the Drupal 8+ configuration synchronization directory relative to a the site’s root directory. Defaults to sites/default/files/config_HASH/sync, where HASH is a random string generated and used for the $settings['hash_salt'] value in the settings.php file.

    Example
    1
    2
    3
    4
    5
    6
    # Set a custom directory for config sync.
    steps:
      - name: Set custom config sync directory.
        plugin: Drupal
        drupalVersion: 11
        configSyncDirectory: ../config/sync
  • subDirectory {string}

    The path to your docroot if it is a subdirectory of your git repository.

    Example
    1
    2
    3
    4
    steps:
      - name: Set Subdirectory
        plugin: Drupal
        subDirectory: web

Database Configuration

  • database {string}

    The file name of the database to import if specified. Note that this database must be added to the assets array separately.

    Example
    1
    2
    3
    4
    5
    6
    assets:
      - mydb.sql.gz
    steps:
      - name: Import database
        plugin: Drupal
        database: mydb.sql.gz
  • databaseGzipped {boolean}

    Whether the database was sent gzipped and whether it should therefore be gunzipped before importing.

    Example
    1
    2
    3
    4
    steps:
      - name: Unzip database
        plugin: Drupal
        databaseGzipped: true
  • databaseBzipped {boolean}

    Whether the database was sent bzipped and whether it should therefore be bunzipped before importing.

    Example
    1
    2
    3
    4
    steps:
      - name: Unzip database
        plugin: Drupal
        databaseBzipped: true

Settings.php Options

  • settingsRequireFile {string}

    A file to require at the end of settings.php. This option helps you to avoid checking settings.php into your repository.

    Example
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    # Require checked in settings
    steps:
      - name: Require Probo-specific site settings
        plugin: Drupal
        settingsRequireFile: sites/default/probo-settings.php
    
    # Use an uploaded asset
    assets:
      - probo-settings.php
    steps:
      - name: Require Probo-specific site settings
        plugin: Drupal
        settingsRequireFile: $ASSET_DIR/probo-settings.php
  • settingsAppend {string}

    Specify a snippet, such as a variable, to append to the end of the settings.php file.

    Example
    1
    2
    3
    4
    5
    6
    steps:
      - name: Append to settings.php
        plugin: Drupal
        settingsAppend: |
          $bar = 'baz';
          $foo = 'stuff';

Database Options

  • mysqlCnfOptions {hash}

    The mysqlCnfOptions hash lets you set any MySQL or MariaDB server setting for your build. Each key/value pair is written to /etc/mysql/probo-settings.cnf - under the [mysqld] section for MySQL or the [mariadb] section for MariaDB - and the server is restarted before your database is created and imported, so the settings are in effect for the import itself. This is useful for large imports that exceed the default packet size or for matching your production server’s configuration:

    Example
    1
    2
    3
    4
    5
    6
    steps:
      - name: Set MySQL options
        plugin: LAMPApp
        mysqlCnfOptions:
          key_buffer_size: 16M
          max_allowed_packet: 128M
  • restartMysql {boolean}

    Whether to restart MySQL. If mysqlCnfOptions is set, MySQL will be restarted automatically, so you probably won’t need to use this.

    Example
    1
    2
    3
    4
    steps:
      - name: Restart MySQL
        plugin: LAMPApp
        restartMysql: true

Additional Options

  • composer {boolean}

    If set to true, it will run the composer install command before any databases are imported, configurations synchronized or any drush commands have been run. The composer file will need to be in the root level of your git repository.

    Example
    1
    2
    3
    4
    5
    # Install all dependencies after cloning the git repository.
    steps:
      - name: Import Site Configuration
        plugin: Drupal
        composer: true
  • drupalVersion {integer}

    Specifies which version of Drupal you are using so that the appropriate commands can be run. For example, if you specify “7” the clearCaches option will run drush cc all. Drupal 8 and higher will run drush cr. Defaults to 11. Accepts the integer values 7 - 12.

    Example
    1
    2
    3
    4
    steps:
      - name: Set Drupal version
        plugin: Drupal
        drupalVersion: 11
  • databaseUpdates {boolean}

    Determines whether to run drush updb after the build is finished.

    Example
    1
    2
    3
    4
    steps:
      - name: Run database updates
        plugin: Drupal
        databaseUpdates: true
  • clearCaches {boolean}

    Determines whether or not to rebuild all caches using drush cr after the build is finished. Pair with the drupalVersion option to ensure the proper command is run for your version of Drupal. Defaults to true.

    Example
    1
    2
    3
    4
    steps:
      - name: Clear caches
        plugin: Drupal
        clearCaches: true
  • configImport {boolean}

    If set to true, it will run the drush config-import command after the database is imported but before any caches are cleared. Note that this only works for Drupal 8+ and is not compatible with Drupal 7.

    Example
    1
    2
    3
    4
    5
    # Import your sites configurations.
    steps:
      - name: Import Site Configuration
        plugin: Drupal
        configImport: true
  • redis {boolean}

    If set to true, enables the on-board Redis server for your site with the default Redis settings for Drupal at the end of the build process. Do not combine this option with custom Redis settings added through the settingsAppend option, as it will override them. See the Drupal Redis Configuration documentation for details, including how to enable Redis with custom settings instead.

    Example
    1
    2
    3
    4
    5
    # Enable Redis caching with the default settings.
    steps:
      - name: Install Your Drupal Web Site With Redis
        plugin: Drupal
        redis: true

Demos and Examples

For examples of different ways you can configure Probo.CI for your Drupal application, check out our Probo Examples & Demonstration page. There you can see practical real-world examples.


Get Started with Probo.CI

Want to Try Probo today?
Get Started Fast!.

------

Your first month is on us. When you sign up for a Probo.CI, every new account starts with a full month free on any of our plans. For more information on how to get started, click here.

LEARN MORE ABOUT PROBO.CI'S PRICING