Skip to content

Commit ba085a6

Browse files
committed
Add release process documentation
1 parent 3492cbc commit ba085a6

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed

docs/releasing.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# How to Create a CAAPH Release
2+
3+
This document describes the process for creating a new release of the Cluster API Addon Provider Helm (CAAPH). This process requires maintainer access to the repository.
4+
5+
1. **Check out code at the correct commit.**
6+
7+
Currently this project releases from the `main` branch. Make sure your local copy of the code is up to date:
8+
9+
```shell
10+
git checkout main
11+
git fetch upstream
12+
git rebase upstream/main
13+
```
14+
15+
2. **Choose the next semantic version.**
16+
17+
Choose the next patch or minor version by incrementing the latest tag:
18+
19+
```shell
20+
git describe --tags --abbrev=0
21+
export RELEASE_VERSION=v0.2.1 # Replace "v0.2.1" with the actual next version
22+
```
23+
24+
3. **Tag the code and push it upstream.**
25+
26+
```shell
27+
git push upstream main
28+
git tag -a $RELEASE_VERSION -m $RELEASE_VERSION
29+
git push upstream $RELEASE_VERSION
30+
```
31+
32+
4. **Wait for a tagged image in the staging repository.**
33+
34+
Pushing the new tag will trigger a [testgrid job](https://testgrid.k8s.io/sig-cluster-lifecycle-image-pushes#post-cluster-api-addon-provider-helm-push-images) to build and push a CAAPH image to the [staging repository](https://console.cloud.google.com/gcr/images/k8s-staging-cluster-api-helm?project=k8s-staging-cluster-api-helm). Wait for the job to complete and for the tagged image to be available before proceeding.
35+
36+
5. **Promote the release image.**
37+
38+
Run the `make promote-images` command to promote the image from the staging repository to the production repository. If your git remotes don't use `https://` URLs, set the `USER_FORK` environment variable to your GitHub username.
39+
40+
```shell
41+
USER_FORK=<username> make promote-images
42+
```
43+
44+
This command will create a Pull Request at [k8s.io](https://github.com/kubernetes/k8s.io/pulls) to promote the image to production. Double-check that the SHA added by the PR matches the SHA of the staging image.
45+
46+
See an [example PR](https://github.com/kubernetes/k8s.io/pull/6652).
47+
48+
6. **Wait for the release image to be available.**
49+
50+
After the PR to promote the image has been approved and merged, wait for the CAAPH image to be available:
51+
52+
```shell
53+
docker pull registry.k8s.io/cluster-api-helm/cluster-api-helm-controller:${RELEASE_VERSION}
54+
```
55+
56+
7. **Update and publish the release on GitHub.**
57+
58+
Pushing the new tag also triggered a [GitHub Action](https://github.com/kubernetes-sigs/cluster-api-addon-provider-helm/actions/workflows/release.yml) which creates [a draft release](https://github.com/kubernetes-sigs/cluster-api-addon-provider-helm/releases).
59+
60+
Edit the draft release and click the "Generate release notes" button. This will populate the release notes with the PRs merged since the last release.
61+
62+
If they contain any merge commits authored by a bot, click through to the original PR, then update the reference so that the actual author is credited.
63+
64+
Once you are satisfied with your changes, publish the release so it's no longer a draft.
65+
66+
8. **Publicize the release.**
67+
68+
Announce the new release on the [CAPI Slack channel](https://kubernetes.slack.com/archives/C8TSNPY4T).

0 commit comments

Comments
 (0)