serverless-heaven / serverless-webpack

Serverless plugin to bundle your lambdas with Webpack

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Invoke without building

sime opened this issue · comments

This is a Feature Proposal

Description

  • What is the use case that should be solved. The more detail you describe this in the easier it is to understand for us.
    We test our functions by running sls invoke local --function blah in CI. It is one of our slowest parts of pipeline. It would be ideal if it could be built once and flagged not to build again.
sls webpack
sls invoke local --function blah1 --noBuild
sls invoke local --function blah2 --noBuild

Similar or dependent issue(s):

  • n/a

Additional Data

  • Serverless-Webpack Version you're using: 4.1.0
  • Webpack version you're using: 3.8.1
  • Serverless Framework Version you're using: 1.25
  • Operating System: OS X/Linux

Hi @sime . I agree, especially in a CI context the pattern is 1 * build, n * invoke. So, a single compile would make sense and a switch to disable building explicitly on all subsequent invokes.

This is related to #288 and might solve this too.

PR available for testing. Use "serverless-webpack": "github:serverless-heaven/serverless-webpack#skip-build-with-invoke-local"

@sime Do you have any chance to test the PR?

@HyperBrain We run our CI on Travis and just tested it. CI time is now 2 minutes faster!

@sime Sounds good. I'll merge the PR now (and delete the branch). Please change to master to keep your builds working in case you continue to use it before the release.

Released with 5.1.0