Install and configure 3rd party plugins automatically (based on serverless.yml)
See original GitHub issueThis is a Bug Report
When updating the plugins section of serverless.yml dynamically, it doesn’t actually install and configure the required plugins.
Here’s a snippet of serverless.yml config:
plugins: ${file(utils/combineServerlessConfig.js):plugins}
utils/combineServerlessConfig.js:
module.exports.plugins = () => { return [ 'serverless-plugin-aws-alerts', 'serverless-plugin-warmup' ] }
Description
- What went wrong?
The .serverless/serverless-state.json pulls in the required plugins, but the plugins doesn’t seem to load.
- What did you expect should have happened?
I would have expected serverless install and deploy serverless-plugin-aws-alerts and serverless-plugin-warmup but it does not.
- What was the config you used?
serverless.yml ` service: aws-python3-example
plugins: ${file(utils/combineServerlessConfig.js):plugins}
provider: name: aws runtime: python3.6
functions: hello: handler: handler.hello `
utils/combineServerlessConfig.js:
module.exports.plugins = () => { return [ 'serverless-plugin-aws-alerts', 'serverless-plugin-warmup' ] }
- What stacktrace or error message from your provider did you see? Does not output any errors; but it doesn’t deploy / configure any of the required packages.
Additional Data
- Serverless Framework Version you’re using: 1.17.0
- Operating System: macOS Sierra 10.12.5
- Stack Trace: N/A
- Provider Error messages: N/A
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:10 (2 by maintainers)
@pmuens How do you auto-install plugins with the
plugin
command? If I runsls plugin install
it tells me I need to provide a plugin name to install:The help information doesn’t mention any other options for auto-installing the plugins specified in
serverless.yml
.Same issue. We end up parsing the yaml in order to install the plugins 1 by 1, or npm installing. Can we run 1 command to install all plugins. It would make CI/CD much simpler. @pmuens or whoever has a better solution.