Giter Site home page Giter Site logo

Comments (7)

weixu365 avatar weixu365 commented on September 25, 2024

What's your serverless configuration?

Does serverless-scriptable-plugin able to fire if you have disable other plugins?

from serverless-scriptable-plugin.

iDVB avatar iDVB commented on September 25, 2024

@weixu365 it "fires" now just fine.
It's just that it fires before the other plugin, when I want it to fire after.

The part that confuses me is that the other plugin uses after:deploy:deploy

And I've tried configuring serverless-scriptable-plugin to both after:deploy:deploy and after:deploy:finalize and still can't get it to fire after.

from serverless-scriptable-plugin.

weixu365 avatar weixu365 commented on September 25, 2024

Did you tried to change the plugin order in serverless config file?

from serverless-scriptable-plugin.

iDVB avatar iDVB commented on September 25, 2024

Yes, serverless-scriptable-plugin is the very last plugin in that list.

plugins:
  - serverless-lambda-version
  - serverless-stack-output
  - serverless-webpack
  - serverless-scriptable-plugin

from serverless-scriptable-plugin.

weixu365 avatar weixu365 commented on September 25, 2024

I wrote a test service to verify the behaviour, and found that the execute order is based on plugins order in serverless.yml file

The problem you got is different one, I think it should be a bug of serverless-stack-output. serverless-stack-output is using promise to get the stack output but DID NOT return the promise object which causes:

  • Start to execute serverless-stack-output
  • Start to execute serverless-scriptable-plugin
  • Finished executing serverless-stack-output

It's simple to fix this issue in serverless-stack-output, just return the promise object in 'process' method. I think you can create an issue in that repo

from serverless-scriptable-plugin.

weixu365 avatar weixu365 commented on September 25, 2024

Here's the output with return in serverless-stack-output:

start to get stack output
Serverless: Stack Output saved to file: ./stack.yaml
running scripts in scriptable plugin
Running javascript file: test.js

and here's the output without return in serverless-stack-output:

start to get stack output
running scripts in scriptable plugin
Running javascript file: test.js
Serverless: Removing old service versions...
Serverless: Stack Output saved to file: ./stack.yaml

from serverless-scriptable-plugin.

iDVB avatar iDVB commented on September 25, 2024

@weixu365 Thanks so much for diving deep into this!
I already have a PR into serverless-stack-output. I'll just add this fix in as well.

Cheers,
D

from serverless-scriptable-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.