Skip to content

randym/shipit-gs

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