jacob-meacham / serverless-plugin-git-variables

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

Use SLS v2 and new variable resolver #76

Closed henhal closed 3 years ago

henhal commented 3 years ago

Currently this plugin uses SLS v1 and a deprecated variable resolver for the custom variable prefix "git". Upgrading to SLS v2 and using the new variable resolver to avoid warnings and upcoming SLS v3 incompatibility where this would cause hard errors.

Also upgrading to npm lockfile v2.

henhal commented 3 years ago

Tests fail for unknown reasons - usage of the new resolver results in all calls being rejected with Invalid variable reference syntax for variable git:describe. You can only reference env vars, options, & files. You can check our docs for more info. although following the guide at https://www.serverless.com/framework/docs/providers/aws/guide/plugins/#custom-variable-types

henhal commented 3 years ago

Fixes #71

jacob-meacham commented 3 years ago

@henhal I've taken this and made a similar change here (with some other updates) - https://github.com/jacob-meacham/serverless-plugin-git-variables/pull/78. It works but the way the tests interact with Serverless no longer does. The tests may need to move more towards an integration test-like structure (where we actually pass in the full config and then call sls.run())

gswallow commented 3 years ago

Is this going to be merged in soon?