|
14 | 14 | example, in the `v0.2.0` release, the container image location is
|
15 | 15 | `us.gcr.io/k8s-artifacts-prod/capi-openstack/capi-openstack-controller:v0.2.0`
|
16 | 16 |
|
| 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 | + |
17 | 30 | ## Process
|
18 | 31 |
|
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` |
21 | 44 | 1. Set an environment variable with the version, e.g.:
|
22 |
| - - `VERSION=v0.4.0` |
| 45 | + - `VERSION=v0.6.0` |
23 | 46 | 1. Create an annotated tag
|
24 | 47 | - `git tag -s -a $VERSION -m $VERSION`.
|
25 | 48 | 1. Push the tag to the GitHub repository:
|
26 | 49 | > NOTE: `upstream` should be the name of the remote pointing to `github.com/kubernetes-sigs/cluster-api-provider-openstack`
|
27 | 50 | - `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. |
29 | 54 | 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`.
|
30 | 55 | The staging repository can be inspected at https://console.cloud.google.com/gcr/images/k8s-staging-capi-openstack/GLOBAL. Be
|
31 | 56 | sure to choose the top level `capi-openstack-controller`, which will provide the multi-arch manifest, rather than one for a specific architecture.
|
32 | 57 | The image build logs are available at [Cloud Build](https://console.cloud.google.com/cloud-build/builds?project=k8s-staging-capi-openstack).
|
33 | 58 | 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. |
35 | 60 | 1. Generate and finalize the release notes and add them to the draft release:
|
36 | 61 | - Run `make release-notes` to gather changes since the last revision. If you need to specify a specific tag to look for changes
|
37 | 62 | since, use `make release-notes RELEASE_NOTES_ARGS="--from <tag>"`.
|
38 | 63 | - 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. |
39 | 68 | 1. Attach the following files to the draft release:
|
40 | 69 | - `./out/infrastructure-components.yaml`
|
41 | 70 | - `./out/cluster-template.yaml`
|
42 | 71 | - `./out/cluster-template-external-cloud-provider.yaml`
|
43 | 72 | - `./out/cluster-template-without-lb.yaml`
|
44 | 73 | - `./out/metadata.yaml`
|
45 |
| -1. Publish release. Use the pre-release option for release candidate or beta versions. |
| 74 | +1. Publish release. |
46 | 75 |
|
47 | 76 | ### Permissions
|
48 | 77 |
|
|
0 commit comments