Git Product home page Git Product logo

ember-cli-deploy-s3-index's Introduction

Ember CLI Deploy

Build Status Code Climate

Simple, flexible deployment for your Ember CLI app

Installation

ember install ember-cli-deploy

Quick start

After installation, choose plugins matching your deployment environment, configure your deployment script appropriately and you're ready to start deploying.

In-depth documentation

Visit the Docs site

Contributing

Clone the repo and run npm install. To run tests,

npm test

ember-cli-deploy-s3-index's People

Contributors

achambers avatar backspace avatar csantero avatar dependabot[bot] avatar elidupuis avatar ember-tomster avatar flecno avatar ghedamat avatar jay-jlm avatar jkeen avatar jrdn91 avatar jrjohnson avatar jthiller avatar khornberg avatar levelbossmike avatar lifeart avatar lukemelia avatar ndekeister-us avatar pablobm avatar quiddle avatar rynam0 avatar sd avatar sethpollack avatar simonihmig avatar taylon avatar tbartelmess avatar twaggs avatar vitch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ember-cli-deploy-s3-index's Issues

Activate task becomes very slow when you have a lot of deployed items

We've been happily using ember-cli-deploy and this plugin for over 6 years - thanks!

As a consequence of this, we've built up a large history of previously deployed versions of our apps (which are available via special URLs for testing and other purposes).

I noticed that our activation stage is taking a long time (we have a bunch of apps across a bunch of environments with a bunch of historical versions) and digging into it I found that a lot of this is due to this plugin needing to list the revisions available on S3 for various reasons.

In #119 I optimised some of the easy cases where it was possible to avoid some of this communication with S3 but we're still left with fetchInitialRevisions and fetchRevisions.

I was trying to figure out why these functions exist/ are called and whether we could optimise them in some way.

I found some relevant discussions:

From these, I wasn't too clear exactly how important these hooks might be. If they impose a high cost on some users (those with full buckets on S3) then could we change their behaviour or somehow speed them up?

It seems like the prime use-case for fetchInitialRevisions is to generate a changelog and indeed we have code which adds an entry to an audit log with the previously active revision and the new one. If other plugins only need to know the previously active revision then we can optimise by at least bailing out of the listObjectRecursively loop once we've found the active revision.

I'm interested in the appetite here for changes around this. If you think this is a problem that most people don't suffer from then we can fork the plugin and change the behaviour for our purposes. But if you think it's something that this plugin should handle then I'd love to talk about possible approaches and exactly what we need from fetchInitialRevisions and fetchRevisions

Backslashes mess up revision activation on Windows

Plugin fails to activate revisions on S3 when used on Windows environments. I am using Windows 10 x64. When creating a query for S3 the key for identifying filenames on S3 contains backslashes and the process fails with following error:

InvalidArgument: Copy Source must mention the source bucket and key: sourcebucket/sourcekey

For everyone encountering the same issue with version 0.1.0 there is a quick and dirty fix. Edit the file ember-cli-deploy-s3-index/lib/s3.js and replace the following line:

var copySource = encodeURIComponent(path.join(bucket, revisionKey);
with
var copySource = encodeURIComponent(path.join(bucket, revisionKey).replace('\\','/'));

ENOENT when running `ember deploy` with `ember-cli-deploy-s3-index` installed

After installing ember-cli-deploy-s3-index, when I run ember deploy I get the following error:

Error: ENOENT: no such file or directory, open 'tmp/deploy-dist/**/*.{js,css,png,gif,ico,jpg,map,xml,txt,svg,swf,eot,ttf,woff,woff2}'
Error: ENOENT: no such file or directory, open 'tmp/deploy-dist/**/*.{js,css,png,gif,ico,jpg,map,xml,txt,svg,swf,eot,ttf,woff,woff2}'
    at Error (native)Pipeline aborted

My config/deploy.js:

/* jshint node: true */

module.exports = function(deployTarget) {
  var s3Credentials = {
    accessKeyId: '...',
    secretAccessKey: '...',
    bucket: '...',
    region: 'us-east-1'
  };
  var ENV = {
    build: { environment: deployTarget },
    s3: s3Credentials,
    's3-index': s3Credentials
  };

  return ENV;
};

The other ember-cli-deploy plugins I have installed are:

  • ember-cli-deploy-build, 0.1.0
  • ember-cli-deploy-manifest, 0.1.0
  • ember-cli-deploy-s3, 0.1.0

AWS Credentials should not be required

Hard-coding AWS credentials is the least recommended option:

  1. Loaded from IAM roles for Amazon EC2 (if running on EC2),
  2. Loaded from the shared credentials file (~/.aws/credentials),
  3. Loaded from environment variables,
  4. Loaded from a JSON file on disk,
  5. Hardcoded in your application

By requiring the AWS Credentials, it prevents using these other methods.

The ember-cli-deploy-s3 plugin recently fixed this with pull request 39.

~~I'm also fairly certain that if region is specified in a ~/.aws/config file, it will get picked up by the AWS SDK as well. Looking into that for sure.~~

NoSuchKey Error

I'm getting the following in the verbose output 'NoSuchKey: The specified key does not exist.'
The credentials appear correct and the same values work in the ember-cli-deploy-s3 plugin. I'm using this as part of the ember-cli-deploy-s3-pack plugin pack. It did work once or twice and then I manually removed some files in the s3 bucket. Is it possible that it is checking for the existence of a file first that has been removed?

Here is my deploy.js

module.exports = function(deployTarget) {
  var s3bucket = process.env.LIFT3_S3_BUCKET + '/' + appVersion + '/' + deployTarget;
  var ENV = {
    build: {},
    // include other plugin configuration that applies to all deploy targets here
    s3: {
      accessKeyId: process.env.AWS_ACCESS_KEY_ID,
      secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
      bucket: s3bucket,
      region: process.env.LIFT3_S3_BUCKET_REGION
    },
    's3-index': {
      accessKeyId: process.env.AWS_ACCESS_KEY_ID,
      secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
      bucket: s3bucket,
      region: process.env.LIFT3_S3_BUCKET_REGION,
      allowOverwrite: true,
    },
    activateOnDeploy: true,
  };

  return ENV;
};

The final line before the error:

+- s3-index
| - preparing to upload revision to S3 bucket lift3-us-east-1.decision-api.acquia.com/0.0.1/production

Full didFail error:

+- didFail
NoSuchKey: The specified key does not exist.
NoSuchKey: The specified key does not exist.
at Request.extractError (/Users/lisa.backer/Documents/workspace/lift/helios/lift3/node_modules/ember-cli-deploy-s3-pack/node_modules/ember-cli-deploy-s3-index/node_modules/aws-sdk/lib/services/s3.js:327:35)
at Request.callListeners (/Users/lisa.backer/Documents/workspace/lift/helios/lift3/node_modules/ember-cli-deploy-s3-pack/node_modules/ember-cli-deploy-s3-index/node_modules/aws-sdk/lib/sequential_executor.js:105:20)
at Request.emit (/Users/lisa.backer/Documents/workspace/lift/helios/lift3/node_modules/ember-cli-deploy-s3-pack/node_modules/ember-cli-deploy-s3-index/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
at Request.emit (/Users/lisa.backer/Documents/workspace/lift/helios/lift3/node_modules/ember-cli-deploy-s3-pack/node_modules/ember-cli-deploy-s3-index/node_modules/aws-sdk/lib/request.js:596:14)
at Request.transition (/Users/lisa.backer/Documents/workspace/lift/helios/lift3/node_modules/ember-cli-deploy-s3-pack/node_modules/ember-cli-deploy-s3-index/node_modules/aws-sdk/lib/request.js:21:10)
at AcceptorStateMachine.runTo (/Users/lisa.backer/Documents/workspace/lift/helios/lift3/node_modules/ember-cli-deploy-s3-pack/node_modules/ember-cli-deploy-s3-index/node_modules/aws-sdk/lib/state_machine.js:14:12)
at /Users/lisa.backer/Documents/workspace/lift/helios/lift3/node_modules/ember-cli-deploy-s3-pack/node_modules/ember-cli-deploy-s3-index/node_modules/aws-sdk/lib/state_machine.js:26:10
at Request. (/Users/lisa.backer/Documents/workspace/lift/helios/lift3/node_modules/ember-cli-deploy-s3-pack/node_modules/ember-cli-deploy-s3-index/node_modules/aws-sdk/lib/request.js:37:9)
at Request. (/Users/lisa.backer/Documents/workspace/lift/helios/lift3/node_modules/ember-cli-deploy-s3-pack/node_modules/ember-cli-deploy-s3-index/node_modules/aws-sdk/lib/request.js:598:12)
at Request.callListeners (/Users/lisa.backer/Documents/workspace/lift/helios/lift3/node_modules/ember-cli-deploy-s3-pack/node_modules/ember-cli-deploy-s3-index/node_modules/aws-sdk/lib/sequential_executor.js:115:18)|
Pipeline aborted

Possible to fail sooner in the process?

I'm wondering if it's possible to fail earlier in the deploy process. More specifically, I'm wondering if it's possible to check AWS credentials/permissions and revision being uploaded before performing the build. It would significantly speed up deployment process, especially when deploying multiple apps simultaneously.

Make `contentType` configurable or auto-detected

TL;DR
I can upload any file type via the filePattern option, but the contentType is always text/html.

Rationale
I know this is the s3-index pluginβ€”which implies index.htmlβ€”but I'm wondering how you feel about make the contentType configurable (and/or automatically detected): https://github.com/ember-cli-deploy/ember-cli-deploy-s3-index/blob/master/lib/s3.js#L50.

The reason I ask I because I'd like to mimic the index.html:rev123 approach of the Lightning Strategy except with a tarball of the deploy-dist directory instead of index.html. My use case is an AWS OpsWorks setup (essentially Chef recipes) which grabs the tarball from S3 and then runs various other AWS deployment tasks. Controlling the contentType would allow ember-cli-deploy-revision-data to work in the same fashion as it does with the Lightning strategy. I chatted briefly about this in the Ember Slack channel last week with @achambers and @lukemelia.

Obviously, because we need the Chef recipes to run, our strategy lacks the instantaneous deployment of the Lightning Strategy but it still shares some of the benefits. I've started thinking of it as the Thunder Strategy. 😜

Thoughts? Concerns?

New release

@LevelbossMike I updated a bunch of dependencies and am ready to cut a new release. Just wanted to make sure you were on board before I did so.

delete old revisions keeping the most 5-10 recent

First off, is this even possible through the interface this addon is using to upload them to S3? If so what are thoughts on allowing some sort of configuration option to specify the number of revisions to keep in the bucket before they get deleted on a deploy? If this is a dum idea then just tell me and close.

The reason for this is those revisions start to pile up and I don't know there there is a great way to manage these other than go in manually and delete the olds ones you know you will never have to roll back to.

Deploying index with revision as undefined.

For some reason it's deploying the index.html file with undefined as the revision. I have the ember-cli-deploy-revision-key installed, and my deploy config looks like this

var ENV = {
    build:{},
    s3: {
      accessKeyId: '***',
      secretAccessKey: '***',
      bucket: '<bucket-name>',
      region: 'us-east-1'
    }
  };

  ENV['s3-index'] = {
    accessKeyId: '***',
    secretAccessKey: '***',
    bucket: '<bucket-name>'
  }

The verbose output when trying to deploy looks like this

ember deploy production --verbose
version: 1.13.13
Registering hook -> configure[build]
Registering hook -> build[build]
Registering hook -> configure[gzip]
Registering hook -> willUpload[gzip]
Registering hook -> configure[manifest]
Registering hook -> willUpload[manifest]
Registering hook -> configure[revision-key]
Registering hook -> didBuild[revision-key]
Registering hook -> configure[s3]
Registering hook -> upload[s3]
Registering hook -> configure[s3-index]
Registering hook -> upload[s3-index]
Executing pipeline
|
+- configure
|  |
|  +- build
|    - validating config
|    - Missing config: `outputPath`, using default: `tmp/deploy-dist`
|    - config ok
|  |
|  +- gzip
|    - validating config
|    - Missing config: `filePattern`, using default: `**/*.{js,css,png,gif,ico,jpg,map,xml,txt,svg,swf,eot,ttf,woff,woff2}`
|    - Missing config: `zopfli`, using default: `false`
|    - Missing config: `keep`, using default: `false`
|    - Missing config: `distDir`, using default: `[Function]`
|    - Missing config: `distFiles`, using default: `[Function]`
|    - config ok
|  |
|  +- manifest
|    - validating config
|    - Missing config: `filePattern`, using default: `**/*.{js,css,png,gif,ico,jpg,map,xml,txt,svg,swf,eot,ttf,woff,woff2}`
|    - Missing config: `manifestPath`, using default: `manifest.txt`
|    - Missing config: `distDir`, using default: `[Function]`
|    - Missing config: `distFiles`, using default: `[Function]`
|    - config ok
|  |
|  +- revision-key
|    - validating config
|    - Missing config: `type`, using default: `file-hash`
|    - Missing config: `filePattern`, using default: `index.html`
|    - Missing config: `distDir`, using default: `[Function]`
|    - Missing config: `distFiles`, using default: `[Function]`
|    - Missing config: `versionFile`, using default: `package.json`
|    - config ok
|  |
|  +- s3
|    - validating config
|    - Missing config: `filePattern`, using default: `**/*.{js,css,png,gif,ico,jpg,map,xml,txt,svg,swf,eot,ttf,woff,woff2}`
|    - Missing config: `prefix`, using default: ``
|    - Missing config: `distDir`, using default: `[Function]`
|    - Missing config: `distFiles`, using default: `[Function]`
|    - Missing config: `gzippedFiles`, using default: `[Function]`
|    - Missing config: `manifestPath`, using default: `[Function]`
|    - Missing config: `uploadClient`, using default: `[Function]`
|    - Missing config: `s3Client`, using default: `[Function]`
|    - config ok
|  |
|  +- s3-index
|    - validating config
|    - Missing config: `region`, using default: `us-east-1`
|    - Missing config: `filePattern`, using default: `index.html`
|    - Missing config: `prefix`, using default: ``
|    - Missing config: `acl`, using default: `public-read`
|    - Missing config: `distDir`, using default: `[Function]`
|    - Missing config: `revisionKey`, using default: `[Function]`
|    - Missing config: `s3Client`, using default: `[Function]`
|    - Missing config: `allowOverwrite`, using default: `false`
|    - config ok
|
+- setup
|
+- willDeploy
|
+- willBuild
|
+- build
|  |
|  +- build
|    - building app to `tmp/deploy-dist` using buildEnv `production`...
|    - βœ”  appspec.yaml
|    - βœ”  assets/bidr-09ec4aeff440c5b2ae394b56dd70c292.css
|    - βœ”  assets/bidr-88cf5795fd3818f2ca96491566021e07.js
|    - βœ”  assets/fonts/bebas_neue/bebas_neue_regular.ttf
|    - βœ”  assets/fonts/bebas_neue/bebas_neue_regular.woff
|    - βœ”  assets/fonts/bebas_neue/bebas_neue_regular.woff2
|    - βœ”  assets/images/auction_items/3714/11543-myjJfC9d1x-b21c8605a39443256c38872f46116bfb.png
|    - βœ”  assets/images/auction_items/3714/11543-myjJfC9d1x-cropped-34500b12eb179f56cba5c4d7ae1ea768.png
|    - βœ”  assets/images/auction_items/3714/11548-b2eJfui3sh-a8a33337fbde3abfc2c3ea462a412e6e.png
|    - βœ”  assets/images/auction_items/3714/11548-b2eJfui3sh-cropped-2c20bc18bfd78a4a01d3b7665de0321d.png
|    - βœ”  assets/images/auction_items/3714/14873-ognjbYieUZ-3e088efdb1207184143cddffff39af0f.png
|    - βœ”  assets/images/auction_items/3714/14873-ognjbYieUZ-cropped-b23a3d22dba606d7f639289e282c3baf.png
|    - βœ”  assets/images/auction_items/3714/2565-eld5Zf3vkG-36754a1a35218b4c65c87d61c21c9136.png
|    - βœ”  assets/images/auction_items/3714/2565-eld5Zf3vkG-cropped-e4f1c789ce671d44582c5aa79a4ef1bd.png
|    - βœ”  assets/images/auction_items/3714/4107-Tc5lRKjuJG-609d53b7a398cb54e16dca2781bacdd8.png
|    - βœ”  assets/images/auction_items/3714/4107-Tc5lRKjuJG-cropped-dc54b17f92a18ac5bbd199c9c82c0197.png
|    - βœ”  assets/images/auction_items/3714/5577-MeAtDRzqCh-a1f12ceb943ee86d7f19485b9197cd45.png
|    - βœ”  assets/images/auction_items/3714/5577-MeAtDRzqCh-cropped-02140cf66f26b4b37b181ae8b4860961.png
|    - βœ”  assets/images/auction_items/3714/5579-pkUaYMcLSn-b18daf12ad219399e85881cdc487fa2e.png
|    - βœ”  assets/images/auction_items/3714/5579-pkUaYMcLSn-cropped-382d19253e4824056cf16f77978356ba.png
|    - βœ”  assets/images/auction_items/3714/5635-Ilbt8xNGsD-4abdbf52af8917d20ba6ce75c1ee83d0.png
|    - βœ”  assets/images/auction_items/3714/5635-Ilbt8xNGsD-cropped-64a9cbff9bc70864a95ade0bb8cb526e.png
|    - βœ”  assets/images/auction_items/3714/5eLvIRZSEU-755374507f3786a4a8f6ca495a63ab05.png
|    - βœ”  assets/images/auction_items/3714/5eLvIRZSEU-cropped-9e7490055005c6043b7971707007ac31.png
|    - βœ”  assets/images/auction_items/3714/LQmU7dqlp8-cc77b45a504723e1a61761f61942d495.png
|    - βœ”  assets/images/auction_items/3714/LQmU7dqlp8-cropped-a2acbdc67aca321cd257f038e7597e54.png
|    - βœ”  assets/images/auction_items/3714/vzDNtMFnas-99e0afe9a8b614f0652c63a9d3dad91f.png
|    - βœ”  assets/images/auction_items/3714/vzDNtMFnas-cropped-ded6c733c6b36b161dd41ed286a36bfc.png
|    - βœ”  assets/images/auction_items/5060/11476-XvuEQiYVIm-b21c8605a39443256c38872f46116bfb.png
|    - βœ”  assets/images/auction_items/5060/11476-XvuEQiYVIm-cropped-59a49ee9a3e3bebdf9e8c3d8d9a61773.png
|    - βœ”  assets/images/auction_items/5060/11479-IsPxBXi0Qj-755374507f3786a4a8f6ca495a63ab05.png
|    - βœ”  assets/images/auction_items/5060/11479-IsPxBXi0Qj-cropped-101e57a94d9b79e7c3e870daa4cb18c6.png
|    - βœ”  assets/images/auction_items/5060/FXy5Jvfina-cropped-da5685f6e993b592635ca2d974e532bf.png
|    - βœ”  assets/images/auction_items/5060/FXy5Jvfina-ed5453138c438ae27badff8eba247a0c.png
|    - βœ”  assets/images/auction_items/5060/hFzK71g6vU-51169783b52d9f6c67f48dfab65fcabc.png
|    - βœ”  assets/images/auction_items/5060/hFzK71g6vU-cropped-5dfb86dc53592d22b5af0f7c6c371650.png
|    - βœ”  assets/images/auction_items/5060/I9To5tfAhV-ae898e54ed85047525bdfdbe1926cf57.png
|    - βœ”  assets/images/auction_items/5060/I9To5tfAhV-cropped-c403651d23b76cc5a2dd88c52e36c7c8.png
|    - βœ”  assets/images/auction_items/no-image-76b0df533fcf41a1219e8c098595e13e.jpg
|    - βœ”  assets/images/bid-button-off-background-8f5e745c3b825aa22d249d10db19f478.png
|    - βœ”  assets/images/bid-button-on-background-18982573972a3a6e6bc583df535e4088.png
|    - βœ”  assets/images/favicon-c43d36922e6da80e047264850fbf6b4b.png
|    - βœ”  assets/images/ring-4d6a8c050f3de65b0d4bd6b2d2b610f4.gif
|    - βœ”  assets/images/ring-alt-ed4ce91f3ee6b4ce2158bad7f3ad9f31.gif
|    - βœ”  assets/vendor-46c5e478f0f379b1d7938e3b81a78d95.js
|    - βœ”  assets/vendor-b878aa19849299f3a3b06bba6cf3e519.css
|    - βœ”  crossdomain.xml
|    - βœ”  fonts/fontawesome-webfont.eot
|    - βœ”  fonts/fontawesome-webfont.svg
|    - βœ”  fonts/fontawesome-webfont.ttf
|    - βœ”  fonts/fontawesome-webfont.woff
|    - βœ”  fonts/fontawesome-webfont.woff2
|    - βœ”  fonts/FontAwesome.otf
|    - βœ”  index.html
|    - βœ”  robots.txt
|    - build ok
|
+- didBuild
|  |
|  +- revision-key
|    - creating revision key using `file-hash`
|    - generated revision key: `56088e49ead726606c53654e3e32cadc`
|
+- willPrepare
|
+- prepare
|
+- didPrepare
|
+- willUpload
|  |
|  +- gzip
|    - gzipping `**/*.{js,css,png,gif,ico,jpg,map,xml,txt,svg,swf,eot,ttf,woff,woff2}`
|    - βœ”  assets/bidr-09ec4aeff440c5b2ae394b56dd70c292.css
|    - βœ”  assets/fonts/bebas_neue/bebas_neue_regular.woff2
|    - βœ”  assets/images/bid-button-off-background-8f5e745c3b825aa22d249d10db19f478.png
|    - βœ”  assets/images/auction_items/no-image-76b0df533fcf41a1219e8c098595e13e.jpg
|    - βœ”  assets/images/bid-button-on-background-18982573972a3a6e6bc583df535e4088.png
|    - βœ”  assets/images/favicon-c43d36922e6da80e047264850fbf6b4b.png
|    - βœ”  assets/vendor-b878aa19849299f3a3b06bba6cf3e519.css
|    - βœ”  crossdomain.xml
|    - βœ”  assets/images/ring-4d6a8c050f3de65b0d4bd6b2d2b610f4.gif
|    - βœ”  robots.txt
|    - βœ”  assets/fonts/bebas_neue/bebas_neue_regular.woff
|    - βœ”  assets/fonts/bebas_neue/bebas_neue_regular.ttf
|    - βœ”  assets/images/auction_items/3714/LQmU7dqlp8-cc77b45a504723e1a61761f61942d495.png
|    - βœ”  assets/images/auction_items/5060/hFzK71g6vU-51169783b52d9f6c67f48dfab65fcabc.png
|    - βœ”  assets/bidr-88cf5795fd3818f2ca96491566021e07.js
|    - βœ”  assets/images/auction_items/3714/5577-MeAtDRzqCh-a1f12ceb943ee86d7f19485b9197cd45.png
|    - βœ”  assets/images/auction_items/3714/5eLvIRZSEU-755374507f3786a4a8f6ca495a63ab05.png
|    - βœ”  assets/images/auction_items/5060/11479-IsPxBXi0Qj-755374507f3786a4a8f6ca495a63ab05.png
|    - βœ”  assets/images/auction_items/3714/14873-ognjbYieUZ-3e088efdb1207184143cddffff39af0f.png
|    - βœ”  assets/images/auction_items/5060/FXy5Jvfina-ed5453138c438ae27badff8eba247a0c.png
|    - βœ”  fonts/fontawesome-webfont.woff2
|    - βœ”  assets/images/ring-alt-ed4ce91f3ee6b4ce2158bad7f3ad9f31.gif
|    - βœ”  fonts/fontawesome-webfont.eot
|    - βœ”  fonts/fontawesome-webfont.woff
|    - βœ”  assets/images/auction_items/3714/5635-Ilbt8xNGsD-4abdbf52af8917d20ba6ce75c1ee83d0.png
|    - βœ”  fonts/fontawesome-webfont.ttf
|    - βœ”  assets/images/auction_items/3714/11548-b2eJfui3sh-a8a33337fbde3abfc2c3ea462a412e6e.png
|    - βœ”  fonts/fontawesome-webfont.svg
|    - βœ”  assets/images/auction_items/5060/I9To5tfAhV-ae898e54ed85047525bdfdbe1926cf57.png
|    - βœ”  assets/images/auction_items/3714/2565-eld5Zf3vkG-36754a1a35218b4c65c87d61c21c9136.png
|    - βœ”  assets/images/auction_items/3714/vzDNtMFnas-99e0afe9a8b614f0652c63a9d3dad91f.png
|    - βœ”  assets/images/auction_items/3714/11548-b2eJfui3sh-cropped-2c20bc18bfd78a4a01d3b7665de0321d.png
|    - βœ”  assets/images/auction_items/3714/5eLvIRZSEU-cropped-9e7490055005c6043b7971707007ac31.png
|    - βœ”  assets/images/auction_items/5060/11479-IsPxBXi0Qj-cropped-101e57a94d9b79e7c3e870daa4cb18c6.png
|    - βœ”  assets/images/auction_items/3714/14873-ognjbYieUZ-cropped-b23a3d22dba606d7f639289e282c3baf.png
|    - βœ”  assets/images/auction_items/3714/5577-MeAtDRzqCh-cropped-02140cf66f26b4b37b181ae8b4860961.png
|    - βœ”  assets/images/auction_items/5060/FXy5Jvfina-cropped-da5685f6e993b592635ca2d974e532bf.png
|    - βœ”  assets/images/auction_items/3714/LQmU7dqlp8-cropped-a2acbdc67aca321cd257f038e7597e54.png
|    - βœ”  assets/images/auction_items/3714/5579-pkUaYMcLSn-b18daf12ad219399e85881cdc487fa2e.png
|    - βœ”  assets/images/auction_items/5060/hFzK71g6vU-cropped-5dfb86dc53592d22b5af0f7c6c371650.png
|    - βœ”  assets/vendor-46c5e478f0f379b1d7938e3b81a78d95.js
|    - βœ”  assets/images/auction_items/3714/5635-Ilbt8xNGsD-cropped-64a9cbff9bc70864a95ade0bb8cb526e.png
|    - βœ”  assets/images/auction_items/3714/2565-eld5Zf3vkG-cropped-e4f1c789ce671d44582c5aa79a4ef1bd.png
|    - βœ”  assets/images/auction_items/3714/vzDNtMFnas-cropped-ded6c733c6b36b161dd41ed286a36bfc.png
|    - βœ”  assets/images/auction_items/3714/4107-Tc5lRKjuJG-cropped-dc54b17f92a18ac5bbd199c9c82c0197.png
|    - βœ”  assets/images/auction_items/3714/4107-Tc5lRKjuJG-609d53b7a398cb54e16dca2781bacdd8.png
|    - βœ”  assets/images/auction_items/3714/11543-myjJfC9d1x-cropped-34500b12eb179f56cba5c4d7ae1ea768.png
|    - βœ”  assets/images/auction_items/5060/11476-XvuEQiYVIm-cropped-59a49ee9a3e3bebdf9e8c3d8d9a61773.png
|    - βœ”  assets/images/auction_items/3714/5579-pkUaYMcLSn-cropped-382d19253e4824056cf16f77978356ba.png
|    - βœ”  assets/images/auction_items/5060/I9To5tfAhV-cropped-c403651d23b76cc5a2dd88c52e36c7c8.png
|    - βœ”  assets/images/auction_items/3714/11543-myjJfC9d1x-b21c8605a39443256c38872f46116bfb.png
|    - βœ”  assets/images/auction_items/5060/11476-XvuEQiYVIm-b21c8605a39443256c38872f46116bfb.png
|    - gzipped 52 files ok
|  |
|  +- manifest
|    - generating manifest at `manifest.txt`
|    - generated manifest including 52 files ok
|
+- upload
|  |
|  +- s3
|    - preparing to upload to S3 bucket `bidr-app-deployment`
|    - Downloading manifest for differential deploy from `manifest.txt`...
|    - Manifest not found. Disabling differential deploy.
|    - βœ”  assets/vendor-b878aa19849299f3a3b06bba6cf3e519.css
|    - βœ”  assets/fonts/bebas_neue/bebas_neue_regular.woff
|    - βœ”  assets/images/bid-button-off-background-8f5e745c3b825aa22d249d10db19f478.png
|    - βœ”  assets/bidr-09ec4aeff440c5b2ae394b56dd70c292.css
|    - βœ”  assets/images/favicon-c43d36922e6da80e047264850fbf6b4b.png
|    - βœ”  assets/images/bid-button-on-background-18982573972a3a6e6bc583df535e4088.png
|    - βœ”  assets/fonts/bebas_neue/bebas_neue_regular.woff2
|    - βœ”  assets/fonts/bebas_neue/bebas_neue_regular.ttf
|    - βœ”  manifest.txt
|    - βœ”  crossdomain.xml
|    - βœ”  robots.txt
|    - βœ”  assets/images/ring-4d6a8c050f3de65b0d4bd6b2d2b610f4.gif
|    - βœ”  assets/images/auction_items/3714/11548-b2eJfui3sh-a8a33337fbde3abfc2c3ea462a412e6e.png
|    - βœ”  assets/bidr-88cf5795fd3818f2ca96491566021e07.js
|    - βœ”  fonts/fontawesome-webfont.ttf
|    - βœ”  assets/images/auction_items/3714/2565-eld5Zf3vkG-36754a1a35218b4c65c87d61c21c9136.png
|    - βœ”  assets/images/auction_items/3714/LQmU7dqlp8-cc77b45a504723e1a61761f61942d495.png
|    - βœ”  assets/images/auction_items/5060/hFzK71g6vU-51169783b52d9f6c67f48dfab65fcabc.png
|    - βœ”  fonts/fontawesome-webfont.svg
|    - βœ”  assets/images/auction_items/3714/5eLvIRZSEU-755374507f3786a4a8f6ca495a63ab05.png
|    - βœ”  fonts/fontawesome-webfont.woff2
|    - βœ”  assets/images/auction_items/5060/11479-IsPxBXi0Qj-755374507f3786a4a8f6ca495a63ab05.png
|    - βœ”  fonts/fontawesome-webfont.eot
|    - βœ”  assets/images/auction_items/3714/14873-ognjbYieUZ-3e088efdb1207184143cddffff39af0f.png
|    - βœ”  assets/images/auction_items/5060/FXy5Jvfina-ed5453138c438ae27badff8eba247a0c.png
|    - βœ”  assets/images/auction_items/3714/5577-MeAtDRzqCh-a1f12ceb943ee86d7f19485b9197cd45.png
|    - βœ”  assets/images/ring-alt-ed4ce91f3ee6b4ce2158bad7f3ad9f31.gif
|    - βœ”  assets/images/auction_items/3714/5579-pkUaYMcLSn-b18daf12ad219399e85881cdc487fa2e.png
|    - βœ”  assets/images/auction_items/3714/11548-b2eJfui3sh-cropped-2c20bc18bfd78a4a01d3b7665de0321d.png
|    - βœ”  assets/images/auction_items/5060/hFzK71g6vU-cropped-5dfb86dc53592d22b5af0f7c6c371650.png
|    - βœ”  fonts/fontawesome-webfont.woff
|    - βœ”  assets/images/auction_items/5060/I9To5tfAhV-ae898e54ed85047525bdfdbe1926cf57.png
|    - βœ”  assets/vendor-46c5e478f0f379b1d7938e3b81a78d95.js
|    - βœ”  assets/images/auction_items/3714/14873-ognjbYieUZ-cropped-b23a3d22dba606d7f639289e282c3baf.png
|    - βœ”  assets/images/auction_items/3714/vzDNtMFnas-99e0afe9a8b614f0652c63a9d3dad91f.png
|    - βœ”  assets/images/auction_items/5060/11479-IsPxBXi0Qj-cropped-101e57a94d9b79e7c3e870daa4cb18c6.png
|    - βœ”  assets/images/auction_items/3714/5eLvIRZSEU-cropped-9e7490055005c6043b7971707007ac31.png
|    - βœ”  assets/images/auction_items/3714/5577-MeAtDRzqCh-cropped-02140cf66f26b4b37b181ae8b4860961.png
|    - βœ”  assets/images/auction_items/5060/FXy5Jvfina-cropped-da5685f6e993b592635ca2d974e532bf.png
|    - βœ”  assets/images/auction_items/3714/5635-Ilbt8xNGsD-4abdbf52af8917d20ba6ce75c1ee83d0.png
|    - βœ”  assets/images/auction_items/3714/11543-myjJfC9d1x-cropped-34500b12eb179f56cba5c4d7ae1ea768.png
|    - βœ”  assets/images/auction_items/3714/2565-eld5Zf3vkG-cropped-e4f1c789ce671d44582c5aa79a4ef1bd.png
|    - βœ”  assets/images/auction_items/3714/LQmU7dqlp8-cropped-a2acbdc67aca321cd257f038e7597e54.png
|    - βœ”  assets/images/auction_items/3714/5635-Ilbt8xNGsD-cropped-64a9cbff9bc70864a95ade0bb8cb526e.png
|    - βœ”  assets/images/auction_items/3714/vzDNtMFnas-cropped-ded6c733c6b36b161dd41ed286a36bfc.png
|    - βœ”  assets/images/auction_items/3714/4107-Tc5lRKjuJG-609d53b7a398cb54e16dca2781bacdd8.png
|    - βœ”  assets/images/auction_items/3714/4107-Tc5lRKjuJG-cropped-dc54b17f92a18ac5bbd199c9c82c0197.png
|    - βœ”  assets/images/auction_items/3714/5579-pkUaYMcLSn-cropped-382d19253e4824056cf16f77978356ba.png
|    - βœ”  assets/images/auction_items/5060/11476-XvuEQiYVIm-b21c8605a39443256c38872f46116bfb.png
|    - βœ”  assets/images/auction_items/3714/11543-myjJfC9d1x-b21c8605a39443256c38872f46116bfb.png
|    - βœ”  assets/images/auction_items/5060/11476-XvuEQiYVIm-cropped-59a49ee9a3e3bebdf9e8c3d8d9a61773.png
|    - βœ”  assets/images/auction_items/5060/I9To5tfAhV-cropped-c403651d23b76cc5a2dd88c52e36c7c8.png
|    - βœ”  assets/images/auction_items/no-image-76b0df533fcf41a1219e8c098595e13e.jpg
|    - uploaded 53 files ok
|  |
|  +- s3-index
|    - preparing to upload revision to S3 bucket `bidr-app-deployment`
|    - βœ”  index.html:undefined
|
+- didUpload
|
+- didDeploy
|
+- teardown
|
Pipeline complete

Am I missing a configuration step? I didn't see anything on the ember-cli-deploy-revision-key that needed to be set in the config.

Error: Cannot find module 'lodash'

Hey,

Just tried installing ember-cli-deploy-s3-index for the first time and i get the following error:

# ember install ember-cli-deploy-s3-index 
Cannot find module 'lodash'
Error: Cannot find module 'lodash'
    at Function.Module._resolveFilename (module.js:339:15)
    at Function.Module._load (module.js:290:25)
    at Module.require (module.js:367:17)
    at require (internal/module.js:16:19)
    at Object.<anonymous> (/Users/code/project/node_modules/ember-cli-deploy-display-revisions/index.js:7:9)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Module.require (module.js:367:17)

is lodash a required dependency?

Use with Prember

I'm trying to get this working with Prember.

Can the filePattern config option accept a regex or similar?

Currently, we're seeing this:

filePattern: '**/*.{html}'

fail with this errpr:

Error: ENOENT: no such file or directory, open 'tmp/deploy-dist/**/*.{html}'
Error: ENOENT: no such file or directory, open 'tmp/deploy-dist/**/*.{html}'
Pipeline aborted

Has anyone had experience using this plugin with Prember? I'd appreciate the help!

Latest release does not include AWS s3 improvements

ember-cli-deploy-s3 created an 0.2 release which allows the user to use iam profiles to upload files to s3, instead of explicitly passing in accessKey and secret params.

This repo has also been updated to include that improvement as well. The documentation even says so. But a new release tag has not been created. I've pointed my package.json to the HEAD of master to resolve this. Is there a reason a release has not been created yet?

InvalidArgument: null in aws-sdk

Started getting the following error when deploying to DigitalOcean Spaces. I've tracked down the offending line. Removing the encodeURIComponent() fixes the error. Is it there for a reason?

https://github.com/ember-cli-deploy/ember-cli-deploy-s3-index/blob/master/lib/s3.js#L109

ember deploy production
WARNING: [ember-intl] `locales` is obsolete and can be removed from config/ember-intl.js.
WARNING: [ember-intl] `disablePolyfill` is obsolete and can be removed from config/ember-intl.js.
WARNING: [ember-intl] `autoPolyfill` is obsolete and can be removed from config/ember-intl.js.
WARNING: Option "nodeWorker" is deprecated since [email protected]. Please use "workerType" instead.
cleaning up...
Deploying [================πŸš€ ------] 76% [plugin: s3-index -> activate]InvalidArgument: null
InvalidArgument: null
    at Request.extractError (/Users/erik/feederco/frontend/node_modules/aws-sdk/lib/services/s3.js:835:35)
    at Request.callListeners (/Users/erik/feederco/frontend/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
    at Request.emit (/Users/erik/feederco/frontend/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
    at Request.emit (/Users/erik/feederco/frontend/node_modules/aws-sdk/lib/request.js:683:14)
    at Request.transition (/Users/erik/feederco/frontend/node_modules/aws-sdk/lib/request.js:22:10)
    at AcceptorStateMachine.runTo (/Users/erik/feederco/frontend/node_modules/aws-sdk/lib/state_machine.js:14:12)
    at /Users/erik/feederco/frontend/node_modules/aws-sdk/lib/state_machine.js:26:10
    at Request.<anonymous> (/Users/erik/feederco/frontend/node_modules/aws-sdk/lib/request.js:38:9)
    at Request.<anonymous> (/Users/erik/feederco/frontend/node_modules/aws-sdk/lib/request.js:685:12)
    at Request.callListeners (/Users/erik/feederco/frontend/node_modules/aws-sdk/lib/sequential_executor.js:116:18)
    at Request.emit (/Users/erik/feederco/frontend/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
    at Request.emit (/Users/erik/feederco/frontend/node_modules/aws-sdk/lib/request.js:683:14)
    at Request.transition (/Users/erik/feederco/frontend/node_modules/aws-sdk/lib/request.js:22:10)
    at AcceptorStateMachine.runTo (/Users/erik/feederco/frontend/node_modules/aws-sdk/lib/state_machine.js:14:12)
    at /Users/erik/feederco/frontend/node_modules/aws-sdk/lib/state_machine.js:26:10
    at Request.<anonymous> (/Users/erik/feederco/frontend/node_modules/aws-sdk/lib/request.js:38:9)
    at Request.<anonymous> (/Users/erik/feederco/frontend/node_modules/aws-sdk/lib/request.js:685:12)
    at Request.callListeners (/Users/erik/feederco/frontend/node_modules/aws-sdk/lib/sequential_executor.js:116:18)
    at callNextListener (/Users/erik/feederco/frontend/node_modules/aws-sdk/lib/sequential_executor.js:96:12)
    at IncomingMessage.onEnd (/Users/erik/feederco/frontend/node_modules/aws-sdk/lib/event_listeners.js:307:13)
    at IncomingMessage.emit (events.js:322:22)
    at IncomingMessage.EventEmitter.emit (domain.js:482:12)
    at endReadableNT (_stream_readable.js:1187:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
Pipeline aborted
    "ember-cli-deploy-s3-index": {
      "version": "1.1.0",
      "resolved": "https://registry.npmjs.org/ember-cli-deploy-s3-index/-/ember-cli-deploy-s3-index-1.1.0.tgz",
      "integrity": "sha512-Yhj5A+ESZ4ZerRysBYi6l63VwuJMKzQep8RWjlG3m3QQ+giLzzB7y2d3GO/gjF9h/3jToS35yBP9tm2yVdty9w==",
      "dev": true,
      "requires": {
        "aws-sdk": "^2.667.0",
        "core-object": "^3.0.0",
        "ember-cli-deploy-plugin": "^0.2.9",
        "mime-types": "^2.1.27",
        "rsvp": "^4.8.5"
      }
    },

Full Changelog link is not working (minor error)

Hi, first of all great plugin and thanks so much for keeping an updated changelog it's very helpful.
I noticed inside CHANGELOG.md there is a Full Changelog link for each release. This is a good idea. There's just a minor bug that is preventing the link from working, the last tag is missing a v before the tag name.

Current not working:
v0.4.0...0.5.0

Should be
v0.4.0...v0.5.0

activating revisions - what about non-fingerprinted files?

One of the head scratchers I've had since I started using the original s3-index adapter was the fact that other non-fingerprinted files like favicon.icon, robots.txt, crossdomain.xml aren't really handled. I can switch revisions, but these other files are not changed, and therefore are just the last version that happened to be uploaded by the s3 plugin. Does it bother anyone else that there is no way of switching revisions for these files, or am I just being pedantic?

Deprecation warning with ember-cli 2.12.0

With ember-cli-2.12.0 I am seeing this deprecation warning when running ember commands

DEPRECATION: `ember-cli/ext/promise` is deprecated, use `rsvp` instead. Required here: 
Object.<anonymous> (/Users/gordonj/git/ninja-prototype/node_modules/ember-cli-deploy-s3-index/lib/s3.js:6:23)

This is with ember-cli-deploy-s3-index 0.5.0

region should be required and not set by default

This would make it similar to the s3 plugin, which made this change because users were having trouble diagnosing incorrect-region issues. I started to looking into implementing this myself, but can't see where the plugin is specifying region at all.

add revision key to failure message

It would be useful to output the revision key that already exists in the "already uploaded" error message

return RSVP.reject("REVISION ALREADY UPLOADED! (set `allowOverwrite: true` if you want to support overwriting revisions)");

I know it gets printed higher up in the verbose output, but its a little hard to find. I'd be willing to contribute a PR for this if there's interest.

No such file or directory, open '/index.html'

Deploying [πŸš€ -] 75% [plugin: s3-index -> upload]Error: ENOENT: no such file or directory, open '/index.html' Error: ENOENT: no such file or directory, open '/index.html' at Error (native)Pipeline aborted

I was getting this error trying to deploy our company's ember app to staging. So, I decided to empty the buckets and create a fresh blank ember app to test if I still get this error 'out of the box'. Still happens. I use the same config. Here is my config file:

module.exports = function(environment) {
  var ENV = {};

  if (environment === 'staging') {
    ENV.plugins = ['s3', 's3-index'];
    ENV.build = {
      environment: 'staging',
    };

    ENV['s3-index'] = {
      accessKeyId: '<removed>',
      secretAccessKey: '<removed>',
      bucket: 'bucket-name',
      region: 'us-west-2'
    };

    ENV.s3 = {
      gzip: true,
      accessKeyId: '<removed>',
      secretAccessKey: '<removed>',
      region: 'us-west-2',
      bucket: 'bucket-name-assets'
    }
  }
  return ENV;
};

GZIP index?

Loving the rearchitecture. One gotcha so far: I have the gzip plugin installed, but the index files don't get gzipped.

I don't really see any code that specifically excludes index.html from being gzipped, thoughts?

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.