This is an internal readme for development processes that should be followed for this repository.
This project leverage Makefiles for project automation. We currently support the following commands.
Lint the project with ESLint
.
make lint
Build the project with Typescript
.
make build.
The below instructions apply regardless of whether PR is submitted from a fork or a branch.
- Make sure you IDE is configured to format modified lines only. Submitting fully formatted files makes it very hard to review, and such will be rejected.
- Tab size is 4 and spaces (be mindful that VSCode may not be the only IDE used).
- he following commands produce no errors and/or warnings:
npm i
make build
make lint
make run-test
cdk list
The CI system attached to the project will run all stacks under examples as end-to-end integration testing.
Currently it works the following way:
- A human maintainer reviews the pr code to ensure it is not malicious
- If the code is trusted and the maintainer wishes to run e2e tests, they comment on the pr with /do-e2e-tests. This will trigger the build and test. Any visibility into the state can only occur through AWS maintainers.
- If job succeeds, the CI bot approves the PR. If it fails it requests changes. Details on what failed will need to be manually shared with external contributors.
- At present shapirov103, kcoleman731 and askulkarni2 have rights to invoke the bot.
At the moment leveraging a private NPM repository for "shapirov". TODO: move under aws-labs.
- Change version in package.json. We are currently using .., e.g. 0.1.5
- Patch version increment must be used for bug fixes, including changes in code and missing documentation.
- Minor version is used for new features that do not change the way customers interact with the solution. For example, new add-on, extra configuration (optional) for existing add-ons. In some cases it may be used with CDK version upgrades provided they don't cause code changes.
- Major version is used for non-compatible changes that will require customers to re-arch. With the exception of version 1. which will be used once the code is production ready (we have tests, pipeline, validation).
- Publishing (if not applied through CI):
make build
(compile)npm publish
(this will require credentials to npm)
For direct contributors:
- Create a feature branch and commit to that branch.
- Create PR to the main branch.
- After review if approved changes will be merged.
For external contributors:
- Create a fork of the repository
- Submit a PR with the following:
- Clear description of the feature
- Test coverage
- Validation instructions
See this document for more details.