jacob-meacham / serverless-plugin-git-variables

:zap: Expose git variables to serverless
MIT License
87 stars 32 forks source link

Integration with Serverless Framework v3 #83

Closed mnapoli closed 2 years ago

mnapoli commented 2 years ago

Hi 👋 , Serverless Framework core team here!

We're working on the v3 beta version right now. The v3 will include a redesigned CLI output:

image

You can try the v3 beta with: npm i serverless@pre-3

I had a quick look at the code of this plugin and it seems like you don't log anything to the CLI output. So I don't think there is anything to change in this plugin.

Let me know if I'm wrong. I'd be happy to help in any way if needed.

Feel free to close this issue if there is nothing to do indeed.


In any case, here is some more information on new plugin API we have added, in case you are curious:

Any feedback is appreciated on all that!

jacob-meacham commented 2 years ago

Hi @mnapoli thanks - I was able to get it working with Serverless v3. However, in v1, I was able to programmatically create a Serverless instance in my tests. That no longer works, which means writing tests is tougher - is there a recommended way to test plugins now?

mnapoli commented 2 years ago

Awesome, thanks for the update!

Regarding tests, there is the https://github.com/serverless/test package that should help with that. Maybe @medikoo can answer that better than me as well.

medikoo commented 2 years ago

@jacob-meacham for testing, I recommend using tool we're relying internally runServerless(https://github.com/serverless/test/blob/master/docs/run-serverless.md), but note that for v3, it changed internally a bit, and changed version is published with @serverlesss/test@pre-9 pre-release)