Serverless Plugin Git Variables

homepage icon https://github.com/jacob-meacham/serverless-plugin-git-variables
Follow @jacob-meacham

Tracked

NPM Downloads Last Month
3226
Issues
3
Stars
25
Forks
13
Watchers
25
Watch Star Fork Issue Download License NPM Build Status Coverage Status Contributors

Repo README Contents:

serverless-plugin-git-variables

Coverage Status Build Status

Expose git variables (HEAD description, branch name, short commit hash, message, and if the local repo has changed files) to your serverless services. Moreover, it adds GIT related environment variables and tags (GIT_COMMIT_SHORT, GIT_COMMIT_LONG, GIT_BRANCH, GIT_IS_DIRTY) for each defined function in the serverless file. You can disable this by adding the following custom variable in your serverless.yml file:

custom:
  exportGitVariables: false

Usage


functions:
  processEventBatch:
    name: ${self:provider.stage}-${self:service}-process-event-batch
    description: ${git:branch} - ${git:describe} - ${git:sha1}

plugins:
  - serverless-plugin-git-variables

Serverless Version Support

Version History