Skip to content

Commit feb3040

Browse files
committed
docs: minor edits to release guide
Signed-off-by: Carlos Salas <[email protected]>
1 parent 4b74f65 commit feb3040

File tree

1 file changed

+48
-30
lines changed

1 file changed

+48
-30
lines changed

docs/book/src/developers/releasing.md

Lines changed: 48 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,23 @@
77
- Open a PR in https://github.com/kubernetes/test-infra to change this [line](https://github.com/kubernetes/test-infra/blob/25db54eb9d52e08c16b3601726d8f154f8741025/config/prow/plugins.yaml#L344)
88
- Example PR: https://github.com/kubernetes/test-infra/pull/16827
99

10-
## Prepare branch
10+
## Prepare main branch for development
1111

12-
TODO
12+
1. Update the file `metadata.yaml` by adding the next release.
1313

14-
## Prepare branch, tag and release notes
14+
1. Submit a PR for the `metadata.yaml` update.
1515

16-
1. Update the file `metadata.yaml` if is a major or minor release
16+
## Create the tag and release notes
1717

18-
2. Submit a PR for the `metadata.yaml` update if needed, wait for it to be merged before continuing, and pull any changes prior to continuing.
19-
20-
3. Create and push the release tags to the GitHub repository:
18+
1. Ensure that CI is stable: [Prow CAPG dashboard](https://prow.k8s.io/?repo=kubernetes-sigs%2Fcluster-api-provider-gcp)
19+
20+
1. Fetch the latest changes and tags, and double check that your branch is at the desired commit:
21+
```bash
22+
git fetch upstream main
23+
git fetch upstream --tags
24+
```
25+
26+
1. Create and push the release tags to the GitHub repository:
2127

2228
```bash
2329
# Export the tag of the release to be cut, e.g.:
@@ -30,32 +36,38 @@ TODO
3036
git push upstream ${RELEASE_TAG}
3137
```
3238

33-
Notes:
39+
<aside class="note">
40+
41+
<h1>Notes</h1>
3442

35-
* `-s` creates a signed tag, you must have a GPG key [added to your GitHub account](https://docs.github.com/en/authentication/managing-commit-signature-verification/generating-a-new-gpg-key)
43+
* The flag `-s` creates a signed tag. You must have a GPG key [added to your GitHub account](https://docs.github.com/en/authentication/managing-commit-signature-verification/generating-a-new-gpg-key).
3644
* This will automatically trigger a [ProwJob](https://prow.k8s.io/?repo=kubernetes-sigs%2Fcluster-api-provider-gcp&job=post-cluster-api-provider-gcp-push-images) to publish images to the staging image repository.
3745

38-
4. Configure gcloud authentication:
46+
</aside>
3947

40-
* `glcoud auth login <your-community-email-address>
48+
1. Configure gcloud authentication:
4149

42-
5. `make release` from repo, this will create the release artifacts in the `out/` folder
50+
```bash
51+
gcloud auth login <your-community-email-address>
52+
```
4353

54+
1. `make release` from repo, this will create the release artifacts in the `out/` folder. It is recommended to verify that the artifact file `infrastructure-components.yaml` points to the new image.
4455

45-
6. Install the `release-notes` tool according to [instructions](https://github.com/kubernetes/release/blob/master/cmd/release-notes/README.md)
4656

47-
7. Generate release-notes (require's exported `GITHUB_TOKEN` variable):
57+
1. Install the `release-notes` tool according to [instructions](https://github.com/kubernetes/release/blob/master/cmd/release-notes/README.md)
4858

49-
Run the release-notes tool with the appropriate commits. Commits range from the first commit after the previous release to the new release commit.
59+
1. Generate release-notes (requires exported `GITHUB_TOKEN` variable):
5060

51-
```bash
52-
release-notes --org kubernetes-sigs --repo cluster-api-provider-gcp \
53-
--start-sha 1cf1ec4a1effd9340fe7370ab45b173a4979dc8f \
54-
--end-sha e843409f896981185ca31d6b4a4c939f27d975de
55-
--branch <RELEASE_BRANCH_OR_MAIN_BRANCH>
56-
```
61+
Run the release-notes tool with the appropriate commits. Commits range from the first commit after the previous release to the new release commit.
5762

58-
8. Manually format and categorize the release notes
63+
```bash
64+
release-notes --org kubernetes-sigs --repo cluster-api-provider-gcp \
65+
--start-sha 1cf1ec4a1effd9340fe7370ab45b173a4979dc8f \
66+
--end-sha e843409f896981185ca31d6b4a4c939f27d975de
67+
--branch <RELEASE_BRANCH_OR_MAIN_BRANCH>
68+
```
69+
70+
1. Manually format and categorize the release notes
5971

6072
## Prepare release in GitHub
6173

@@ -74,9 +86,9 @@ To promote images from the staging repository to the production registry (`regis
7486
1. Wait until images for the tag have been built and pushed to the [staging repository](https://console.cloud.google.com/gcr/images/k8s-staging-cluster-api-gcp/global/cluster-api-gcp-controller) by
7587
the [push images job](https://prow.k8s.io/?repo=kubernetes-sigs%2Fcluster-api-provider-gcp&job=post-cluster-api-provider-gcp-push-images).
7688

77-
2. If you don't have a GitHub token, create one by going to your GitHub settings in [Personal access tokens](https://github.com/settings/tokens). Make sure you give the token the `repo` scope.
89+
1. If you don't have a GitHub token, create one by going to your GitHub settings in [Personal access tokens](https://github.com/settings/tokens). Make sure you give the token the `repo` scope.
7890
79-
3. Create a PR to promote the images to the production registry:
91+
1. Create a PR to promote the images to the production registry:
8092
8193
```bash
8294
# Export the tag of the release to be cut, e.g.:
@@ -93,14 +105,20 @@ To promote images from the staging repository to the production registry (`regis
93105
- `kpromo` uses `[email protected]:...` as remote to push the branch for the PR. If you don't have `ssh` set up you can configure
94106
git to use `https` instead via `git config --global url."https://github.com/".insteadOf [email protected]:`.
95107
- This will automatically create a PR in [k8s.io](https://github.com/kubernetes/k8s.io) and assign the CAPV maintainers.
96-
4. Merge the PR (/lgtm + /hold cancel) and verify the images are available in the production registry:
108+
1. Merge the PR (/lgtm + /hold cancel) and verify the images are available in the production registry:
97109
- Wait for the [promotion prow job](https://prow.k8s.io/?repo=kubernetes%2Fk8s.io&job=post-k8sio-image-promo) to complete successfully. Then verify that the production images are accessible:
98110

99111
```bash
100112
docker pull registry.k8s.io/cluster-api-provider-gcp/cluster-api-gcp-controller:${RELEASE_TAG}
101113
```
102114

103-
Example PR: https://github.com/kubernetes/k8s.io/pull/1462
115+
<aside class="note">
116+
117+
<h1>Tip</h1>
118+
119+
You can use the following [sample PR](https://github.com/kubernetes/k8s.io/pull/1462)
120+
121+
</aside>
104122

105123
Location of image: https://console.cloud.google.com/gcr/images/k8s-staging-cluster-api-gcp/GLOBAL/cluster-api-gcp-controller?rImageListsize=30
106124

@@ -127,9 +145,9 @@ Example versions:
127145
## Expected artifacts
128146

129147
1. A release yaml file `infrastructure-components.yaml` containing the resources needed to deploy to Kubernetes
130-
2. A `cluster-templates.yaml` for each supported flavor
131-
3. A `metadata.yaml` which maps release series to cluster-api contract version
132-
4. Release notes
148+
1. A `cluster-templates.yaml` for each supported flavor
149+
1. A `metadata.yaml` which maps release series to cluster-api contract version
150+
1. Release notes
133151

134152
## Communication
135153

@@ -140,7 +158,7 @@ Example versions:
140158
### Minor/Major Releases
141159

142160
1. Follow the communications process for [pre-releases](#pre-releases)
143-
2. An announcement email is sent to `[email protected]` with the subject `[ANNOUNCE] cluster-api-provider-gcp <version> has been released`
161+
1. An announcement email is sent to `[email protected]` with the subject `[ANNOUNCE] cluster-api-provider-gcp <version> has been released`
144162

145163
[release-announcement]: #communication
146164
[semver]: https://semver.org/#semantic-versioning-200

0 commit comments

Comments
 (0)