Use QuickSilver to automate build steps on Pantheon
Introduction
Use QuickSilver automation scripts committed to Kalamuna default installation to automate post code sync workflow on Pantheon.
Decision
On Pantheon, after the code sync workflow is complete, we need to run certain commands to import configuration, perform database updates, and clear caches. Those commands can be automated with the QuickSilver scripts and workflows already set up in the Kalamuna Drupal installation. Alternatively, they can be installed on the legacy projects by copying them from the current version of the Kalamuna Drupal installation.
This deploy script should be enabled on code sync, not on deploy. In the pantheon.yml file, the setup would look like this:
workflows:
sync_code:
after:
- type: webphp
description: Import configuration from .yml files
script: private/scripts/quicksilver/quicksilver-deploy-tools/postdeploy.php
Context
Configuration import, database updates, and cache clearing are the repetitive tasks that can be automated to avoid human error and speed up the deployment process. Pantheon provides QuickSilver integration that allows to automate those tasks.
Consequences
- You don’t need to run the commands manually.
- In rare cases the commands will fail to run if Pantheon is experiencing an outage or configuration is not importable.
- When deploying we must remember to safely import configuration, a step that is not required when pushing code to dev or multidev.
Exceptions
- Legacy project that doesn’t use configuration management.
Additional Resources
None