1.0.1 • Published 4 years ago

ember-cli-deploy-gcloud-storage v1.0.1

Weekly downloads
53
License
MIT
Repository
github
Last release
4 years ago

ember-cli-deploy-gcloud-storage

An Ember-CLI-Deploy plugin to upload assets to Google Cloud Storage (can also be used for Firebase).

NPM Build Status Ember Observer Score
Ember-CLI Deploy Version

Compatibility

  • Ember.js v3.16 or above
  • Ember CLI v2.13 or above
  • Node.js v10 or above

Quick Start

To get up and running quickly, do the following:

ember install ember-cli-deploy-gcloud-storage
  • Place the following configuration into config/deploy.js
ENV['gcloud-storage'] = {
  credentials: {
    private_key: '<your-private-key>',
    client_email: '<your-client-email>',
  },
  projectId: '<your-gcloud-project-id>',
  bucket: '<your-storage-bucket>',
};
  • Run the pipeline
ember deploy production

Configuration

  • credentials - GCP credentials object, { private_key, client_email }, required (can be specified with GCP envs/config).
  • keyFilename - Alternative configuration to the credentials option. Specify the path to the key file downloaded for service account.
  • projectId - Your GCP project id, required (can be specified with GCP envs, GCLOUD_PROJECT=<projectId> ember deploy).
  • bucket - A bucket in GCS to store your files, required.
  • bucketFolder - A folder inside the bucket to place your files, optional.
  • distFiles - Files that need to be deployed, defaults to all files in the dist directory.
  • gzippedFiles - Files that are already gzipped, hence not requiring more gzipping. This defaults to values from ember-cli-deploy-gzip.
  • filePattern - Applied to the distFiles via minimatch.
  • metadata - Hash of metadata properties to be applied to uploaded files.
  • makePublic - Boolean, if set to true will make the uploaded file public. Default is false.

TODO

  • Create bucket if it doesn't exist
  • Support a manifest file
  • Add more of the options that the s3 plugin has
  • Tests

Contributing

See CONTRIBUTING.md.

See the Contributing guide for details.