Repository navigation
Add package plugin - #1494
Add package plugin#1494
Conversation
23f02ba to
84bd1bc
Compare
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.
0e0f7e2 to
b9336ac
Compare
|
looks like you got everything in the issue covered. Awesome Job 😊 |
|
@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). |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
We do this is the user specifies the excludeor include rules in the package property of the service.
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
Ah sorry missed that. Will remove it for now. Thanks for the feedback
This PR implements the basic building blocks of #1486
It will hook into the
deploy:createDeploymentPackagelifecycle and zip the whole service. This .zip file is then stored inside the.serverlesstemporary directory of the service.The cleanup function which is run in the
after:deploy:deploylifecycle will make sure that the.serverlessdirectory is removed from the service.