Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --no-build switch for invoke local to use already compiled output #347

Merged
merged 4 commits into from
Mar 14, 2018

Conversation

HyperBrain
Copy link
Member

@HyperBrain HyperBrain commented Mar 13, 2018

What did you implement:

Closes #341
Closes #275

How did you implement it:

On invoke local we check for a --no-build command line switch now and skip the compile step. This enables the requested feature, so that on your CI server where tests are run, you just do a single sls webpack and multiple invoke local --no-build to fire mutliple integration tests onto one build output.
However, enabling local invoke mode --watch together with the switch is not recommended and will NOT disable the compile (somehow that's implicit).

The operation with the new switch will be aborted if the plugin does not find a webpack output directory (i.e. no compile was done before). Additionally a message will be logged as soon as the switch is used.

Off-Topic: Fixed an issue with event spawn for the step offline plugin in this PR.

How can we verify it:

Use the following steps and check that a compile is not triggered by invoke local:

sls webpack
sls invoke local --no-build --function=XXXXX
sls invoke local --no-build --function=YYYYY

Todos:

  • Write tests
  • Write documentation
  • Fix linting errors
  • Make sure code coverage hasn't dropped
  • Provide verification config / commands / resources
  • Enable "Allow edits from maintainers" for this PR
  • Update the messages below

Is this ready for review?: YES
Is it a breaking change?: NO

@HyperBrain HyperBrain added this to the 5.1.0 milestone Mar 13, 2018
@HyperBrain HyperBrain force-pushed the skip-build-with-invoke-local branch from cc8aae5 to 3e4cd0b Compare March 14, 2018 11:59
@HyperBrain HyperBrain merged commit 0164159 into master Mar 14, 2018
@HyperBrain HyperBrain deleted the skip-build-with-invoke-local branch March 14, 2018 13:04
jamesmbourne pushed a commit to jamesmbourne/serverless-webpack that referenced this pull request Oct 15, 2019
…build-with-invoke-local

Add --no-build switch for invoke local to use already compiled output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant