2017 © Pedro Peláez
 

quicksilver-script quicksilver-pushback

Push commits made via the Pantheon dashboard back to original GitHub repository.

image

pantheon-systems/quicksilver-pushback

Push commits made via the Pantheon dashboard back to original GitHub repository.

  • Saturday, July 22, 2017
  • by greg.1.anderson
  • Repository
  • 11 Watchers
  • 4 Stars
  • 83,247 Installations
  • PHP
  • 11 Dependents
  • 0 Suggesters
  • 2 Forks
  • 4 Open issues
  • 8 Versions
  • 29 % Grown

The README.md

Quicksilver Pushback

Quicksilver Pushback v2.x Terminus v2.x Compatible, (*1)

This Quicksilver project is used in conjunction with the various suite of Terminus Build Tools-based example repositories to push any commits made on the Pantheon dashboard back to the original Git repository for the site. This allows developers (or other users) to work on the Pantheon dashboard in SFTP mode and commit their code, through Pantheon, back to the canonical upstream repository via a PR. This is especially useful in scenarios where you want to export configuration (Drupal, WP-CFM)., (*2)

Requirements

It is recommended that you use one of the example PR workflow projects (Drupal 8, WordPress) as a starting point for leveraging this tool., (*3)

  • Support is only provided for the 2.x version of Terminus Build Tools.
  • The project currently supports Github, GitLab (including self-hosted), and BitBucket providers.
  • This Quicksilver script only works with Pantheon sites that have been configured to use a Git PR workflow.

Installation

This project is designed to be included from a site's composer.json file, and placed in its appropriate installation directory by Composer Installers., (*4)

In order for this to work, you should have the following in your composer.json file:, (*5)

{
  "require": {
    "composer/installers": "^1.0.20"
  },
  "extra": {
    "installer-paths": {
      "web/private/scripts/quicksilver": ["type:quicksilver-script"]
    }
  }
}

The project can be included by using the command:, (*6)

composer require pantheon-systems/quicksilver-pushback:^2, (*7)

If you are using one of the example PR workflow projects (Drupal 8, WordPress) as a starting point for your site, these entries should already be present in your composer.json., (*8)

Example pantheon.yml

Here's an example of what your pantheon.yml would look like if this were the only Quicksilver operation you wanted to use., (*9)

api_version: 1

workflows:
  sync_code:
    after:
      - type: webphp
        description: Push changes back to Git repository if needed
        script: private/scripts/quicksilver/quicksilver-pushback/push-back.php

If you are using one of the example PR workflow projects as a starting point for your site, this entry should already be present in your pantheon.yml., (*10)

build-providers.json

Quicksilver pushback requires a build-providers.json file in the git root that specifies the git provider used for the project., (*11)

Valid git provider values are github, gitlab and bitbucket., (*12)

Example contents of build-providers.json created by Terminus Build Tools for a GitHub and CircleCI project are below:, (*13)

{"git":"github","ci":"circleci"}

Upgrading from 1.x to 2.x

Existing projects will have been created at different points in time, making the steps to upgrade slightly different for each project. In general, we have found success with the following:, (*14)

  • Update to Quicksilver Pushback 2.x
  • Copy files/private/github-secrets.json on the Pantheon site to files/private/.build-secrets/tokens.json
    • This must be done for all environments
  • Ensure build-providers.json exists in the code base
    • Projects created from an older version of Terminus Build Tools may have this missing
  • Update the Quicksilver Pushback script path in pantheon.yml from private/scripts/quicksilver/quicksilver-pushback/push-back-to-github.php to private/scripts/quicksilver/quicksilver-pushback/push-back.php

The Versions

22/07 2017

dev-master

9999999-dev

Push commits made via the Pantheon dashboard back to original GitHub repository.

  Sources   Download

MIT

The Requires

 

21/07 2017

1.0.1

1.0.1.0

Push commits made via the Pantheon dashboard back to original GitHub repository.

  Sources   Download

MIT

The Requires

 

09/03 2017

1.0.0

1.0.0.0

Push commits made via the Pantheon dashboard back to original GitHub repository.

  Sources   Download

MIT

09/03 2017

1.0.0-alpha4

1.0.0.0-alpha4

Push commits made via the Pantheon dashboard back to original GitHub repository.

  Sources   Download

MIT

09/03 2017

1.0.0-alpha3

1.0.0.0-alpha3

Push commits made via the Pantheon dashboard back to original GitHub repository.

  Sources   Download

MIT

09/03 2017

dev-keep-canonical

dev-keep-canonical

Push commits made via the Pantheon dashboard back to original GitHub repository.

  Sources   Download

MIT

09/03 2017

1.0.0-alpha2

1.0.0.0-alpha2

Push commits made via the Pantheon dashboard back to original GitHub repository.

  Sources   Download

MIT

26/01 2017

1.0.0-alpha1

1.0.0.0-alpha1

Push commits made via the Pantheon dashboard back to original GitHub repository.

  Sources   Download

MIT