Skip to content

Commit

Permalink
docs: add hotfix and rollback release processes
Browse files Browse the repository at this point in the history
  • Loading branch information
lalver1 committed Aug 6, 2024
1 parent 66399e4 commit 66ac896
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/deployment/.pages
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@ nav:
- infrastructure.md
- secrets.md
- release.md
- hotfix.md
- rollback.md
- troubleshooting.md
- workflows.md
45 changes: 45 additions & 0 deletions docs/deployment/hotfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Making a hotfix release

This list outlines the manual steps needed to make a hotfix release of the
`benefits` app.

If `main` contains in-progress work that is not yet ready for a release but a simple code fix
is needed in production, a separate process to test the changes before deploying to production must be undertaken.
This is called a hotfix release. Typically, a hotfix release involves a simple code change that can be quickly implemented, in contrast to a [rollback release](./rollback.md), which generally requires more complex code changes which take more time to implement.

[Start a new Release on Github](https://github.com/cal-itp/benefits/issues/new?labels=release&template=release.yml&title=Make+a+Release){ .md-button }

## 0. Create a temporary hotfix branch from the latest release tag

```bash
git checkout -b <hotfix-branch> <release-tag>
```

Replace `<hotfix-branch>` with the hotfix branch name and `<release-tag>` with the latest release tag.

## 1. Fix whatever issue is wrong using the hotfix branch

Commit the code changes that fix the issue that prompted the hotfix.

## 2. Tag the HEAD of the hotfix branch with a release tag

```bash
git tag -a YYYY.0M.R
```

Git will open your default text editor and prompt you for the tag annotation. For the tag annotation,
use the release tag version and close the text editor.

## 3. Push the tag to GitHub to kick off the hotfix

```bash
git push origin YYYY.0M.R
```

## 4. [Generate release notes](https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes)

Edit release notes with additional context, images, animations, etc. as-needed and link to the Release process issue.

## 5. Merge into `main` for the next release

Create a PR to merge the changes from the hotfix branch into `main` for the next release.
36 changes: 36 additions & 0 deletions docs/deployment/rollback.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Making a rollback release

This list outlines the manual steps needed to make a rollback of the
`benefits` app.

If a change is deployed to the app that makes it fail to start, making a rollback
will deploy the app to a known working state again.

[Start a new Release on Github](https://github.com/cal-itp/benefits/issues/new?labels=release&template=release.yml&title=Make+a+Release){ .md-button }

## 0. Create a temporary branch from the last known good release tag

```bash
git checkout -b <rollback-branch> <release-tag>
```

Replace `<rollback-branch>` with the rollback branch name and `<release-tag>` with the last known good release tag.

## 1. Tag the HEAD of the rollback branch with a rollback release tag

```bash
git tag -a YYYY.0M.R
```

Git will open your default text editor and prompt you for the tag annotation. For the tag annotation,
use the rollback release tag version and close the text editor.

## 2. Push the tag to GitHub to kick off the rollback

```bash
git push origin YYYY.0M.R
```

## 3. [Generate release notes](https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes)

Edit release notes with additional context, images, animations, etc. as-needed and link to the Release process issue.

0 comments on commit 66ac896

Please sign in to comment.