Skip to content

Shipit-gs is a set of shipit tasks for deployment to Google Cloud Storage.

Notifications You must be signed in to change notification settings

randym/shipit-gs

Folders and files

NameName
Last commit message
Last commit date
Feb 21, 2018
Feb 21, 2018
Feb 2, 2018
Feb 7, 2018
Feb 7, 2018
Feb 7, 2018
Feb 12, 2018
Feb 9, 2018
Feb 2, 2018
Feb 12, 2018
Feb 12, 2018
Feb 12, 2018

Repository files navigation

shipit-gs

Build Status

Maintainability

Test Coverage

Shipit-gs is a set of shipit tasks for deployment to Google Cloud Storage.

What it can do:

  • Automatically create Google Cloud configurations for each environment
  • Deploy a local resource to a Bucket on Google Cloud Storage
  • Rollback a deployment
  • Manage multiple releases

Install

npm install shipit-gs

Usage

Example shipitfile.js

module.exports = function (shipit) {
  require('shipit-gs')(shipit);

  shipit.initConfig({
    default: {
      dirToCopy: 'dist',
      gsDeployTo: 'myapp',
      keepReleases: 2,
    },
    staging: {
      gsBucket: 'staging-bucket',
      gsProject: 'staging-project',
    }
  });
};

To deploy to your staging bucket, just run :

shipit staging gs-deploy

To rollback, run :

shipit staging gs-rollback

Dependencies

Options

gsProject

Type: String

The Google Cloud Platform project to use.

gsDeployTo

Type: String

The path on your bucket where current and releases directories will live.

keepReleases

Type: Integer

The number of releases to keep in the releases directory. Older releases are automatically removed when the number of releases exceeds this value.

gsBucket

Type: String

The name of the bucket you want to deploy to. The gs:// prefix will be added for you to generate URLs like gs://staging-bucket/myapp/current

Workflow tasks

  • gs-deploy

    • gs-gcloud
      • Configure and Authenticate Google Cloud Platform
    • gs-deploy:init
      • Emit event "gs-deploy".
    • gs-deploy:update
      • Copy dirToCopy to current
      • Copy current to releases
      • Remove old releases
    • gs-deploy:finished
      • Emit event "gs-deploy:finsihed".
  • gs-rollback

    • gs-gcloud
      • Configure and Authenticate Google Cloud Platform
    • gs-rollback:init
      • Emit event "gs-rollback".
    • gs-rollback:update
      • Remove latest release
      • Copy newest remaining release to current
    • gs-rollback:finished
      • Emit event "gs-rollback:finished".

License

MIT

About

Shipit-gs is a set of shipit tasks for deployment to Google Cloud Storage.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published