name | description |
---|---|
cdk-codepipeline-github | Sends codbuild and codepipeline status events to github |
cdk-static-site | Creates static site infrastructure |
cdk-deletion-protection | Protects infrastructure from deletion |
This repo tests, and packages different modules into npm mods which can be used in other New Era Code applications
Uses:
- TypeScript
- Lerna
- Jest
- Lerna Script
- TSlint
- Eslint
- AWS Cloud Development Kit - Software development framework for defining your cloud infrastructure in code and provisioning it through AWS CloudFormation.
- Node.js (>= 8.11.x)
- Installed globally:
$ npm install -g lerna aws-cdk typescript
There are some optional handy lerna tools:
- Lerna Wizard
- Lerna Update Wizard - make sure to install this globally, it doesn't work as a devDependancy.
$ npm install -g lerna-wizard lerna-update-wizard
Make sure not to commit any sensative files:
Copy the sample.env
file and rename it / place it in the root as .env
.
Build:
$ npm install
$ npm run setup
$ npm run build
$ npm run test
To make sure the npm modules from external libraries are up to date in all of the packages, run:
$ npm run update
- Run the following commands:
$ lerna create @neweracode/cdk-<name-of-package> packages
for example:
$ lerna create @neweracode/cdk-deletion-protection packages
- Answer questions. Look at the package.json files in the other modules for sample information.
- Copy files from cdk-boilerplate folder
- Change EVERYTHING that has the string
cdk-boilerplate
(including filenames) andCDKBoilerplate
(incuding classes) to match the name of your package. - Modify files for your library / module
- When the code is committed to the repo a git pre-push hook versions the changed modules automatically.
- When the code is pushed, the ci process will pack and publish the modules.
For this process to occur, the codebuild stack in the ci package must have already been deployed and working. See CI setup below for more information.