1.0.3 • Published 7 years ago

lambda-continuous-delivery v1.0.3

Weekly downloads
1
License
ISC
Repository
github
Last release
7 years ago

lambda-continuous-delivery

This module goal is to deploy:

  • CloudFormation Stacks
  • Lambda Functions

###Function flow: 1. Generate package: Finds recursively in each folder the file "package.json", if it's found, a deploy script is generated for that lambda function. 2. Execute NPM Scripts: Executes the script generated in the previous process. 3. Deploy Lambda Code: Generates a zip for each lambda function, then uploads it to S3 and finally deletes the zip. 4. Deploy CloudFormation Stack: Find all .json files in the folder where the stacks are saved and uploads it to S3.

###Deploy script 1. cd "Lambda folder": Move to the lambda function folder. 2. npm install: Install every package. 3. npm run cover: Execute tests and coverage report. 4. npm prune --production: Remove dev dependencies.

###Configurable parameters All parameters are setted as environment variables

  • ROOT_PATH: Path of the root folder.
  • GIT_BRANCH: Current branch.
  • DEPLOY_BRANCHES: Branches that will trigger the deploy process, seperated by comma and whitout white spaces.
    • Default:
      • "origin/development"
      • "origin/staging"
      • "origin/master"
  • NAME_BRANCHES: Names of the branches to be used in the deploy script, need to be in the same order as the DEPLOY_BRANCHES
    • Default:
      • "development"
      • "staging"
      • "production"
  • AWS_ACCESS_KEY_ID: AWS access key id.
  • AWS_SECRET_ACCESS_KEY: AWS secret key.
  • S3_BUCKET_CODE: Bucket to deploy the lambda functions.
  • S3_BUCKET_CF: Bucket to deploy the CloudFormation stacks.
  • REGION: AWS Region.
  • LAMBDA_PATH: Folder containing the lambda functions.
    • Default: ROOT_PATH + /lambda
  • CF_PATH: Folder containing the CloudFormation stacks.
    • Default: ROOT_PATH + /provisioning
  • EXCLUDE_FOLDER: Folders that will'nt be checked for package.json, separated by comma and whitout white spaces.
1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago