Releases - YourDeveloperFriend/choochoo GitHub Wiki

I am going to attempt to document the process that I am establishing for Continuous deployment. This is a bit new to me, so what happens in practice may not match what my expectations are, so I'm trying to document my intention before setting it up.

Roles:

  • Owner (me) has full access to do whatever the fuck I want.
  • Admins have the ability to review and approving incoming PR's and bypass code review for emergency purposes.
  • Contributors have the ability to submit PR's.

Code Review

Incoming submissions will need to be reviewed by an admin. We will have a presubmit that verifies:

  • Linting standards
  • Prettify
  • Builds correctly (both by esbuild, and verified by TypeScript, because esbuild does not verify all typing)
  • Tests pass

No one has the ability to push directly to the repository except the owner. Everyone else has to go through the review process. Admins have permission to review and approve incoming PR's. While Admins cannot approve their own PR's, they have permission to bypass this requirement in the case of emergencies.

Major releases

Major changes should be blocked by a flag. I haven't built this yet. However, the pattern is as follows:

  • Site Admins will have permission to view a page where they can configure the flags.
  • Flags will be maintained in a database.
  • Changing the flag will update the database and push out the new flags to all clients.
  • Clients will fetch the flags when a user visits the page.

On Push

When there is an update to the main branch, then it should trigger the following:

  • It should create a new release and tag it as latest.
  • It should build the binaries and publish them to the new github release.
  • It should clear the previously tagged latest.
  • It should deploy these binaries to production.

Push directly to production you say? We could deploy on a staging server first, but this is a pointless exercise unless I either (1) build e2e tests that engage with staging or (2) introduce into the process a certification step where I verify that the release is healthy. That's too much work, maybe later.