Giter VIP home page Giter VIP logo

terminus-upstream-deployment-plugin's Introduction

Terminus Upstream Deployment Plugin

CircleCI Terminus v1.x Compatible

Terminus plugin to automate the process of updating a site through the upstream. This performs a backup before applying upstream updates.

This plugin differs from terminus-mass-update as this will only take a single site at a time along with the following features:

  • take a backup of your dev environment
  • pull any updates from the upstream and apply them on dev
  • run updatedb on your dev environment
  • run clear cache on your dev environment
  • check to see if your test environment initialized
  • take a backup of your test environment
  • run updatedb on your test environment
  • run clear cache on your test environment
  • check to see if youur live environment is initialized
  • take a backup of your live environment
  • run updatedb on your test environment
  • run clear cache on your live environment

Examples

Default Running

$ terminus site:update companysite-33.dev

Skip Backups

$ terminus site:update companysite-33.dev --skip_backups

Apply updates through git using the default upstream branch

$ terminus site:update companysite-33.dev --git

Perform updates using a separate repository

$ terminus site:update companysite-33.dev --git --repo="git://github.com/pantheon-systems/drops-7.git"

Perform updates using a separate repository and a separate branch

$ terminus site:update companysite-33.dev --git --repo="git://github.com/pantheon-systems/drops-7.git" --branch="dev"

Apply updates through git using a particular branch of the upstream

$ terminus site:update companysite-33.dev --git --branch="dev"

Installation

For help installing, see Manage Plugins

mkdir -p ~/.terminus/plugins
composer create-project -d ~/.terminus/plugins terminus-plugin-project/terminus-upstream-deployment-plugin:~1

Help

Run terminus list site:update for a complete list of available commands. Use terminus help <command> to get help on one command.

terminus-upstream-deployment-plugin's People

Contributors

sean-e-dietrich avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

terminus-upstream-deployment-plugin's Issues

Allow for multiple site names

Currently the plugin only allows for 1 site name to be used. The bash script I originally created allowed for a list of client names to apply the updates too. It would be cool if they would run in a queue as well and specialize how many items could run in parallel.

Add Notify Option

it would be great to have a general notify option which could execute other scripts when finished.

Updates do not reliably reach the Live environment

To reproduce:

  1. Create a new custom Drupal (7 in my case) upstream in Pantheon
  2. Create a new site mysite in Pantheon using the custom upstream
  3. Initialize mysite’s Test and Live environments in Pantheon
  4. Commit and push a trivial change to the custom upstream repo
  5. Wait for the update to become available in the mysite’s Pantheon dashboard for the dev environment
  6. Run the plugin: terminus site:update mysite --message="Upstream Deployment Test" --skip_backups

Expected result

The code change would be merged into mysite’s Dev environment, then deployed to the Test and Live environments

Actual result

The change only makes it up to Test:

 [notice] mysite Starting
 [notice] Applying 1 upstream update(s) to the dev environment of mysite...
[============================] 18 secs 8.0 MiB [notice] Applied upstream updates to "dev"
 [notice] mysite: dev drush updatedb
 [notice] mysite: dev drush clear cache
 [notice] mysite: test deploying updates
 [notice] mysite: test drush updatedb
 [notice] mysite: test drush clear cache
 [notice] mysite: live has no deployable code
 [notice] mysite: live drush updatedb
 [notice] mysite: live drush clear cache
 [notice] Completed Upstream Update for mysite
 [notice] Started: 2018-05-09 18:15:16
Ended: 2018-05-09 18:15:53
Total Time: 0 hours 0 minutes 37 seconds

Error during back ups

Whenever attempting to run backups the connection drops and gives some of the following error messages:

[error]  cURL error 7: Failed to connect to terminus.pantheon.io port 443: Operation timed out (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
[error]  cURL error 56: SSLRead() return error -9806 (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
[error]  cURL error 7: Failed to connect to terminus.pantheon.io port 443: Network is unreachable (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)

Issue does not happen when running standard terminus command backup:create

Issue does not happen on all sites

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.