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.
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
For contributing to this project and testing the output locally, you will need
- NodeJS 8.x
- Yarn 1.x
- Create tmp/ directory in the root of the project
- Set envrionment variable for devleopment:
export NODE_ENV=development
yarn lint
- Validatse all JS and JSON passes lintingyarn 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.
- Merge all changes into master
- Bump package.json,
git tag
and push everything to master - Upload the contents of src/index.js to Lambda
- Create Release Notes in GitHub