diff --git a/README.md b/README.md index 01db349..84f3cfe 100644 --- a/README.md +++ b/README.md @@ -98,3 +98,41 @@ Change `profile` file as needed, In most cases it only needs change for version To build firmware, ```./build.sh``` +--- + +# Continuous Deployment + +Summary: + +| | Development Builds | Release Builds | +|:-------:|---------------------------------------------------------------------|------------------------------------------------------------| +| Purpose | Internal use, may not be 100% stable but useful for testing | Meant for use by general users | +| Trigger | Commit to branch | Github Release created from branch | +| Output | `http://downloads.onioniot.com/builds/$RELEASE_VERSION/$BUILD_DATE` | `http://downloads.onioniot.com/releases/$RELEASE_VERSION/` | + +Where: +* `$RELEASE_VERSION` is the `VERSION` from the `profile` config file +* `$BUILD_DATE` is the current date, in the format `%Y%m%d-%H%M%S` + +## Development Builds in Branches + +When a new branch is created from the default branch in the BuildSystem repository, following the regular expression pattern `openwrt-2\d.\d\d`, an action is automatically triggered in GitHub Actions. This action then creates a new pipeline in AWS CodePipeline using Terraform. + +The new pipeline, following the pattern corresponding to the regex openwrt-2\d.\d\d, employs the development buildspec and will be triggered whenever a new commit is made to the branch that generated the creation of this pipeline. The build generated by this pipeline is stored in S3 at s3://$OUTPUT_BUCKET/builds/$RELEASE_VERSION/ + +When a branch following the regex pattern `openwrt-2\d.\d\d` is deleted, the corresponding pipeline in AWS CodePipeline will be automatically removed through Terraform. + +## Newly Created Releases + +When a new release is created on GitHub from development branches, it is automatically merged into the `release` branch, triggering the production AWS CodePipeline. The resulting files are stored in the Release S3, overwriting the contents in the bucket s3://$OUTPUT_BUCKET/releases/$RELEASE_VERSION/ + +## Process: Creating a Release + +* Commit update to `profile` that increments the `VCODE` number +* Create a new release: + * Name the release `__` where `` is `00` and increments by 1 if there are multiple releases needed in a single day + * Create a tag that's named same as the release, based on the branch in question + * Populate the Release description with bullet points outlining what's been Added, Changed, Removed, and/or Fixed + * Also use generate release notes feature +* Publish the release +