143 Commits

Author SHA1 Message Date
Philipp Muens
8ea06053a2 Fix s3 is undefined bug 2016-06-14 20:03:56 +02:00
Eslam A. Hefnawy
e56f61718e added Event to resource names 2016-06-10 16:57:48 +02:00
Eslam A. Hefnawy
4060ad6507 removed options obj 2016-06-10 16:55:14 +02:00
Eslam A. Hefnawy
11a5507f31 removed outdated comment 2016-06-10 16:55:14 +02:00
Eslam A. Hefnawy
f23ae6933f added schedule event 2016-06-10 16:55:14 +02:00
Philipp Muens
1403088b29 Append namespaces to s3 event resources 2016-06-10 14:09:15 +02:00
Philipp Muens
df25e0af48 Remove namespacing of S3 event bucket
This way users are not confused if they won't find their bucket because of the
namespacing that was previously applied.
2016-06-10 11:21:18 +02:00
Philipp Muens
60e7be805d Rename "awsRemoveResources" to "awsRemove"
This way it's less verbose and sticks to the overall used naming convention.
2016-06-10 10:40:37 +02:00
Philipp Muens
a3a7440c32 Add check if S3 events are available
Add this check so that the forEach loop won't fail if the user has not setup an
S3 event.
2016-06-10 09:05:42 +02:00
Philipp Muens
24b90af89d Fix linting errors and reduce ratchet to 100 2016-06-10 07:43:37 +02:00
Philipp Muens
82cbccf6b0 Refactor plugins to use new constructor based options passing 2016-06-09 20:09:50 +02:00
Philipp Muens
e563a071b5 Add option definitions to core plugins 2016-06-09 19:43:13 +02:00
Philipp Muens
2e701c1d4d Fix failing tests for "create" plugin 2016-06-09 19:43:13 +02:00
Philipp Muens
09b701fa40 Start updating of create plugin to work with recent changes in PluginManager 2016-06-09 19:43:13 +02:00
Philipp Muens
40f6dab03f Move options passing to the plugins constructor 2016-06-09 19:43:13 +02:00
Philipp Muens
67ba3f06ae Add merging of generated resources to the aws.Resources section (in service)
This way the plugin simply adds the Resources to the CloudFormation template in the
compileEvents lifecycle. The deploy plugin will use this resources to update the stack later on.
This removes the dependency between the awsCompileS3Events plugin and the deploy plugin
as the awsCompileS3Events plugin simply adds the resources to the section and forgets about it.
2016-06-09 19:08:54 +02:00
Philipp Muens
8e2dcf4c15 Add implementation for awsCompileS3Events plugin 2016-06-09 19:07:47 +02:00
Philipp Muens
2fe214b999 Add fix to check for the correct resource (should be a function) 2016-06-09 17:10:42 +02:00
Philipp Muens
a851b58c7f Fix failing "awsDeploy" hook promise chain tests 2016-06-09 16:33:00 +02:00
Philipp Muens
fb4d31215b Fix linting and naming issues 2016-06-09 16:08:52 +02:00
Philipp Muens
739e5d46a8 Add fix for update function in "updateStack"
This fix makes it possible to iterate over the service.resources.aws.Resources
property to attach the zipFileKey to the corresponding function resource.
Furthermore this fix removes the tight coupling between the "awsDeploy" and "awsCompileFunctions"
plugins.
2016-06-09 15:10:46 +02:00
Philipp Muens
cc258c8398 Uppercase "AwsDeploy" class name
So that it sticks to the overall naming convention.
2016-06-09 14:34:08 +02:00
Philipp Muens
a7a4d55b6a Attach compiled functions to the aws.Resources object
This way the "compileFunctions" plugin has no direct dependency to the "awsDeploy"
plugin.
2016-06-09 14:05:00 +02:00
Eslam A. Hefnawy
b4fa9a498f fixed sync promises in arary 2016-06-09 13:19:09 +02:00
Philipp Muens
061616f5d8 Fix broken create test (in createStack) 2016-06-09 07:52:48 +02:00
Philipp Muens
6d2e67f21a Refactor awsDeploy to use new deploy lifecycles
The awsDeploy plugin now uses different lifecycles to split the tasks up and
introduce a way for 3rd party plugin developers to hook into those lifecycle to e.g.
add resources before everything is deployed.
2016-06-09 07:18:05 +02:00
Philipp Muens
e092308d6b Fill empty strings for function template with placeholders 2016-06-08 11:58:01 +02:00
Philipp Muens
a7acecbf05 Remove programmatically role setting for Lambda function 2016-06-08 08:23:51 +02:00
Philipp Muens
2ed4283c1d Add tests for option validation
Those tests will be remove later on when the new PluginManager is ready to be merged.
2016-06-08 07:35:31 +02:00
Philipp Muens
553bf31f05 Rename functionObj to functionObject 2016-06-08 06:52:13 +02:00
Philipp Muens
5d1894aa05 Remove "compileFunctions" out of "awsDeploy" plugin 2016-06-07 20:38:35 +02:00
Philipp Muens
0e6fde8ab0 Move Role addition out of "compileFunctions" 2016-06-07 20:35:37 +02:00
Philipp Muens
179e92cd01 Move "compileFunctions" into own plugin 2016-06-07 16:37:46 +02:00
Philipp Muens
cc79161aa1 Rename invokeAws to awsInvoke
So that it sticks to the overall used plugin naming.
2016-06-05 20:49:15 +02:00
Philipp Muens
c276c489f6 Refactor passing of stackName to monitorRemove promise
This way it's more clear what's going on.
2016-06-03 11:23:12 +02:00
Philipp Muens
9316bc7714 Split bucketName to make ESLint happy 2016-06-02 21:24:21 +02:00
Philipp Muens
e34f2bdb48 Cleanup code according to comments by @eahefnawy 2016-06-02 21:24:21 +02:00
Philipp Muens
6ad9487720 Fix stack removal procedure through CloudFormation 2016-06-02 21:24:21 +02:00
Philipp Muens
43f6c9be13 Fix removal for objects in bucket
Check if there's something to remove otherwise resolve.
2016-06-02 21:24:21 +02:00
Philipp Muens
2dcce98dc1 Remove unnecessary mocks in emptyS3Bucket test 2016-06-02 21:24:21 +02:00
Philipp Muens
1ed7b97b08 Add removeStack functionality 2016-06-02 21:24:21 +02:00
Philipp Muens
2de494d1a4 Fix hook call to use new command and lifecycle event 2016-06-02 21:24:21 +02:00
Philipp Muens
bd4ca61eb0 Remove nested "remove resources" command
Remove the nesting so that a single "serverless remove" can be use to remove
the service. This aligns with the code pattern which is already implemented.
2016-06-02 21:24:21 +02:00
Philipp Muens
e86fe50236 Update validateInput test 2016-06-02 21:24:21 +02:00
Philipp Muens
ef2893f755 Add emptyS3Bucket functionality 2016-06-02 21:24:21 +02:00
Philipp Muens
a380614ed8 Add validateInput functionality 2016-06-02 21:24:21 +02:00
Philipp Muens
25f127517e Add scaffold for awsRemoveResources plugin
Add a basic scaffold to kickstart work on the awsRemoveResources plugin.
Refs #1228
2016-06-02 21:24:21 +02:00
Eslam A. Hefnawy
ea470daf90 fixed S3 bucket name 2016-06-02 21:04:25 +02:00
Eslam A. Hefnawy
b1561800eb fixed some linting issues 2016-06-02 15:33:23 +02:00
Eslam A. Hefnawy
beee6f1348 added consoleLog method 2016-06-02 15:24:34 +02:00