You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A serverless plugin for tracking deployed versions of your code.
Description
This plugin has a super simple function: after you run serverless deploy, it will create a local git tag based on the version of the Lambda function that you just deployed. For instance, if your function is named foo-production-index and a deploy creates Lambda version 56, this plugin will automatically create a local git tag foo-production-index-56.
This guarantees that you always know exactly what version of your source code is actually running in the cloud.
By default, this plugin only runs for deployments to the production stage. If you'd like to customize this behavior, you can set the versionTrackerStages custom variable.
Add serverless-version-tracker to the plugin list of your serverless.yml file:
plugins:
- serverless-version-tracker
Quick start instructions
Ensure that you have committed all of your changes to Git. The deploy will be aborted if the Git working directory is not clean. This prevents the possibility of deploying uncommitted / untraceable / volatile code.
Run a deploy as normal (i.e. sls deploy --stage production). The plugin will automatically tag your local Git repository with the Lambda function name and new version.
Make sure to push the new tag to your remote repository (the plugin won't do this for you).
About
Serverless plugin to track versions of deployed services