Skip to content

Latest commit

 

History

History
33 lines (27 loc) · 2.24 KB

Readme.md

File metadata and controls

33 lines (27 loc) · 2.24 KB

lambda-topology

GitHub release CircleCI branch GitHub issues GitHub issues GitHub license

Overview

Lambda for topology ingestion of the topology in GitHub to the Contributary website. The Lambda is run on a cron to update topology once a day.

Workflow

Changes submitted to src/*.js are uploaded manually to the AWS Lambda function console. Currently there are two Lambdas used

  • ingest - Copies data/topology.json from GitHub once a day and copies it into an S3 bucket
  • read - Responds to api/topology requests in API Gateway with the contents of the topology file in S3

Development

For contributing to this project and testing the output locally, you will need

  1. NodeJS 8.x
  2. Yarn 1.x
  3. Create tmp/ directory in the root of the project
  4. Set envrionment variable for devleopment: export NODE_ENV=development
  • yarn lint - Validatse all JS and JSON passes linting
  • yarn ingest - Run src/ingeest.js and by default output the file in tmp/
  • yarn read - Run src/read.js and by default output the file in tmp/

With the appropriate AWS credentials exported locally, testing against the live endpoints can be done by running export NODE_ENV=production before the relevant task.

Release Procedure

  1. Merge all changes into master
  2. Bump package.json, git tag and push everything to master
  3. Upload the contents of src/index.js to Lambda
  4. Create Release Notes in GitHub