Skip to content

Commit 013482a

Browse files
committed
🌱 Update RELEASE.md process for release branches
1 parent 7d00ee0 commit 013482a

File tree

1 file changed

+35
-6
lines changed

1 file changed

+35
-6
lines changed

RELEASE.md

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,35 +14,64 @@
1414
example, in the `v0.2.0` release, the container image location is
1515
`us.gcr.io/k8s-artifacts-prod/capi-openstack/capi-openstack-controller:v0.2.0`
1616

17+
## Version number
18+
19+
A release version string is: `vX.Y.Z`.
20+
21+
A pre-release version string additionally has a suffix:
22+
- `alpha` for an alpha release
23+
- `beta` for a beta release
24+
- `rc` for a release candidate
25+
and an additional index starting at 0. This takes the form: `vX.Y.Z-[suffix].N`. e.g. the first release candidate prior
26+
to version 1.2.3 would be called `v1.2.3-rc.0`.
27+
28+
It is recommended to create at least one release candidate when bumping `X` or `Y`.
29+
1730
## Process
1831

19-
1. Make sure your repo is clean by git's standards.
20-
1. Make sure you are on the correct branch (`main` for the current release and `release-0.x` for older releases).
32+
1. Make sure your repo is clean by git's standards. It is recommended to use a fresh checkout.
33+
1. When bumping `X` or `Y` (but not Z or the pre-release suffix) in the release version you must create a new release branch called `release-X.Y`.
34+
> NOTE: `upstream` should be the name of the remote pointing to `github.com/kubernetes-sigs/cluster-api-provider-openstack`
35+
- git checkout main
36+
- git pull
37+
- git checkout -b release-`X`.`Y`
38+
- git push --set-upstream `upstream`
39+
1. When bumping `X` or `Y` (but not Z or the pre-release suffix) in the release version, ensure you have added a new
40+
entry to [metadata.yaml](https://github.com/kubernetes-sigs/cluster-api-provider-openstack/blob/main/metadata.yaml)
41+
as [described in the CAPI book](https://cluster-api.sigs.k8s.io/clusterctl/provider-contract.html#metadata-yaml), and
42+
that this has been committed to the release branch prior to release.
43+
1. Make sure you are on the correct release branch: `release-X.Y`
2144
1. Set an environment variable with the version, e.g.:
22-
- `VERSION=v0.4.0`
45+
- `VERSION=v0.6.0`
2346
1. Create an annotated tag
2447
- `git tag -s -a $VERSION -m $VERSION`.
2548
1. Push the tag to the GitHub repository:
2649
> NOTE: `upstream` should be the name of the remote pointing to `github.com/kubernetes-sigs/cluster-api-provider-openstack`
2750
- `git push upstream $VERSION`
28-
1. Run `make release` to build artifacts (the image is automatically built by CI)
51+
52+
This will cause the image to be automatically built by CI and pushed to the staging repository. As this only builds
53+
the image, it only takes a few minutes.
2954
1. Follow the [image promotion process](https://github.com/kubernetes/k8s.io/tree/main/k8s.gcr.io#image-promoter) to promote the image from the staging repo to `k8s.gcr.io/capi-openstack`.
3055
The staging repository can be inspected at https://console.cloud.google.com/gcr/images/k8s-staging-capi-openstack/GLOBAL. Be
3156
sure to choose the top level `capi-openstack-controller`, which will provide the multi-arch manifest, rather than one for a specific architecture.
3257
The image build logs are available at [Cloud Build](https://console.cloud.google.com/cloud-build/builds?project=k8s-staging-capi-openstack).
3358
Add the new sha=>tag mapping to the [images.yaml](https://github.com/kubernetes/k8s.io/edit/main/k8s.gcr.io/images/k8s-staging-capi-openstack/images.yaml) (use the sha of the image with the corresponding tag). The PR to update the [images.yaml](https://github.com/kubernetes/k8s.io/edit/main/k8s.gcr.io/images/k8s-staging-capi-openstack/images.yaml) must be approved in the [OWNERS](https://github.com/kubernetes/k8s.io/blob/main/k8s.gcr.io/images/k8s-staging-capi-openstack/OWNERS) file and merged.
34-
1. Create a draft release in GitHub based on the tag created above
59+
1. Run `make release` to build artifacts to be attached to the GitHub release.
3560
1. Generate and finalize the release notes and add them to the draft release:
3661
- Run `make release-notes` to gather changes since the last revision. If you need to specify a specific tag to look for changes
3762
since, use `make release-notes RELEASE_NOTES_ARGS="--from <tag>"`.
3863
- Pay close attention to the `## :question: Sort these by hand` section, as it contains items that need to be manually sorted.
64+
1. Create a draft release in GitHub based on the tag created above
65+
- Name the release `Release [VERSION]` where VERSION is the full version string.
66+
- For a pre-release, ensure you check `This is a pre-release` in GitHub when creating the release.
67+
- Add the release notes generated above as the release description.
3968
1. Attach the following files to the draft release:
4069
- `./out/infrastructure-components.yaml`
4170
- `./out/cluster-template.yaml`
4271
- `./out/cluster-template-external-cloud-provider.yaml`
4372
- `./out/cluster-template-without-lb.yaml`
4473
- `./out/metadata.yaml`
45-
1. Publish release. Use the pre-release option for release candidate or beta versions.
74+
1. Publish release.
4675

4776
### Permissions
4877

0 commit comments

Comments
 (0)