A Terminus plugin that adds the commands to facilitate hotfix workflows on Pantheon sites.
While this plugin has worked well for us your mileage may vary due to local machine configuration. This repository is provided without warranty or direct support. Issues and questions may be filed in GitHub but their resolution is not guaranteed.
Clone this project into your Terminus plugins directory found at $HOME/.terminus/plugins
. If the $HOME/.terminus/plugins
directory does not exists you can safely create it. You will also need to run composer install
in the plugin directory after cloning it. See installing Terminus plugin for details.
A hotfix is the only way to push code directly to Live without having to go through Dev and Test. Any damage to the source code will be the responsibility of the user. The intended use case is for critical security releases or bug fixes that need to be deployed as quickly and easily as possible. Hotfixes should be used with care and only in emergency situations. Hotfixes should be the exception, not the norm.
Currently hotfix deployments, emergency updates to test/live that skip the normal workflow and potentially undeployed code in master
, need to be done manually and require more advanced git skills. See the hotfix doc for details. This plugin aims to make that process easier.
- Terminus
1.8.0
or greater - git command line
terminus hotfix:env:git-ref <site>.<env>
- returns the deployed git reference of the specifiied environment.terminus hotfix:env:create <site>.<env> <multidev>
- creates a new environment for the site with code, database and files from the environment by checking out the lastest git tag associated with environment.terminus hotfix:env:deploy <site>.<env> <multidev>
- deploy the changes from the specified environment directly to for the site , skipping the normal workflow, and rebase the changes back to themaster
branch/dev environment.
MIT
terminus hotfix:env:deploy
will fail on environments that have had a backup restored without a code deployment since the backup.