Skip to content

Commit

Permalink
Update README.md to include details on completed CD system updates
Browse files Browse the repository at this point in the history
  • Loading branch information
greenbreakfast authored Mar 20, 2024
1 parent ec93d6d commit a0b6d68
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<OPENWRT_RELEASE>_<DATE>_<NUMBER>` where `<NUMBER>` 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

0 comments on commit a0b6d68

Please sign in to comment.