Skip to content

Add package plugin - #1494

Merged
flomotlik merged 7 commits into
v1.0from
add-package-plugin
Jul 8, 2016
Merged

flomotlik merged 7 commits into
v1.0from
add-package-plugin

Conversation

@pmuens

@pmuens pmuens commented Jul 6, 2016

Copy link
Copy Markdown
Contributor

This PR implements the basic building blocks of #1486

It will hook into the deploy:createDeploymentPackage lifecycle and zip the whole service. This .zip file is then stored inside the .serverless temporary directory of the service.

The cleanup function which is run in the after:deploy:deploy lifecycle will make sure that the .serverless directory is removed from the service.

@pmuens pmuens added this to the v1.0.0-alpha.2 milestone Jul 6, 2016
@pmuens pmuens self-assigned this Jul 6, 2016
@eahefnawy eahefnawy mentioned this pull request Jul 6, 2016
5 of 20 tasks
@flomotlik flomotlik mentioned this pull request Jul 6, 2016
4 tasks done
@pmuens pmuens mentioned this pull request Jul 6, 2016
5 tasks done
@pmuens
pmuens force-pushed the add-package-plugin branch 2 times, most recently from 23f02ba to 84bd1bc Compare July 7, 2016 12:15
pmuens added 6 commits July 7, 2016 20:10
Update the hook order because the functions need the .zip file in their resource
definition. Furthermore the zipping process / writing it to disc was optimized.
The ".serverless" directory is also added to the "default exclude array" so that it's not
considered during packaging.
@pmuens
pmuens force-pushed the add-package-plugin branch from 0e0f7e2 to b9336ac Compare July 7, 2016 18:10
@eahefnawy

Copy link
Copy Markdown
Contributor

looks like you got everything in the issue covered. Awesome Job 😊

@pmuens

pmuens commented Jul 8, 2016

Copy link
Copy Markdown
Contributor Author

@eahefnawy Thank you! This was kind of a "no brainer" thanks to the great work which was already done and the test coverage we have in place!

#### `deploy:createDeploymentPackage`

The whole service get's zipped up into one .zip file. Serverless will automatically apply exclude rules based on the
used programming languages (you can always include previously excluded files and folders if you want to).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the moment we're not really doing any specific include/exclude rules though are we? Would remove the sentence for now until we know how we're going to do this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do this is the user specifies the excludeor include rules in the package property of the service.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But we don't automatically include/exclude based on a specific language. Imho this should be implemented in templates, but not in the packaging mechanism. See this comment for details: #1517 (comment)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah sorry missed that. Will remove it for now. Thanks for the feedback

@flomotlik
flomotlik merged commit a36fb96 into v1.0 Jul 8, 2016
@flomotlik
flomotlik deleted the add-package-plugin branch July 8, 2016 15:06
@flomotlik flomotlik mentioned this pull request Jul 12, 2016
4 tasks done
@pmuens pmuens mentioned this pull request Aug 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants