|
1 | | -# Releasing |
| 1 | +# ip-address-manager releasing |
2 | 2 |
|
3 | | -<!-- START doctoc generated TOC please keep comment here to allow auto update --> |
4 | | -<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> |
| 3 | +This document details the steps to create a release for |
| 4 | +`ip-address-manager` aka IPAM. |
5 | 5 |
|
6 | | -- [Prerequisites](#prerequisites) |
7 | | - - [`docker`](#docker) |
8 | | -- [Output](#output) |
9 | | - - [Expected artifacts](#expected-artifacts) |
10 | | - - [Artifact locations](#artifact-locations) |
11 | | -- [Process](#process) |
12 | | - - [Permissions](#permissions) |
| 6 | +## Before making a release |
13 | 7 |
|
14 | | -<!-- END doctoc generated TOC please keep comment here to allow auto update --> |
| 8 | +Things you should do before making a release: |
15 | 9 |
|
16 | | -## Prerequisites |
| 10 | +- Uplift controller Go modules to use latest corresponding CAPI modules |
| 11 | +- Uplift any other direct/indirect dependency to close any public |
| 12 | + vulnerabilities |
17 | 13 |
|
18 | | -### `docker` |
| 14 | +## Permissions |
19 | 15 |
|
20 | | -You must have docker installed. |
| 16 | +Creating a release requires repository `write` permissions for: |
21 | 17 |
|
22 | | -## Output |
| 18 | +- Tag pushing |
| 19 | +- Branch creation |
| 20 | +- GitHub Release publishing |
23 | 21 |
|
24 | | -### Expected artifacts |
| 22 | +These permissions are implicit for the org admins and repository admins. |
| 23 | +Release team member gets his/her permissions via `metal3-release-team` |
| 24 | +membership. This GitHub team has the required permissions in each repository |
| 25 | +required to release IPAM. Adding person to the team gives him/her the necessary |
| 26 | +rights in all relevant repositories in the organization. Individual persons |
| 27 | +should not be given permissions directly. |
25 | 28 |
|
26 | | -1. A container image of the ip-address-manager manager |
27 | | -1. A git tag |
28 | | -1. A deployment file : ipam-components.yaml |
| 29 | +## Process |
29 | 30 |
|
30 | | -### Artifact locations |
| 31 | +IPAM uses [semantic versioning](https://semver.org). For version `v1.x.y`: |
31 | 32 |
|
32 | | -1. The container image is found in the registry `quay.io/metal3-io` with an image |
33 | | - name of `ip-address-manager` and a tag that matches the release |
34 | | - version. The image is automatically built once the release has been created. |
| 33 | +### Repository setup |
35 | 34 |
|
36 | | -## Creating a release for IPAM |
| 35 | +Clone the repository: |
| 36 | +`git clone [email protected]:metal3-io/ip-address-manager` |
37 | 37 |
|
38 | | -### Process |
| 38 | +or if using existing repository, verify your intended remote is set to |
| 39 | +`metal3-io`: `git remote -v`. For this document, we assume it is `origin`. |
39 | 40 |
|
40 | | -For version v0.x.y: |
| 41 | +- If creating a new minor branch, identify the commit you wish to create the |
| 42 | + branch from, and create a branch `release-1.x`: |
| 43 | + `git checkout <sha> -b release-1.x` and push it to remote: |
| 44 | + `git push origin release-1.x` to create it |
| 45 | +- If creating a new patch release, use existing branch `release-1.x`: |
| 46 | + `git checkout origin/release-1.x` |
41 | 47 |
|
42 | | -1. Create the release notes `make release-notes`. Copy the output and sort |
43 | | - manually the items that need to be sorted. |
44 | | -1. Create an annotated tag `git tag -a v0.x.y -m v0.x.y`. To use your GPG |
45 | | - signature when pushing the tag, use `git tag -s [...]` instead |
46 | | -1. Push the tag to the GitHub repository `git push origin v0.x.y` |
47 | | - NB: `origin` should be the name of the remote pointing to |
48 | | - `github.com/metal3-io/ip-address-manager` |
49 | | -1. Run `make release` to build artifacts (the image is automatically built by CI) |
50 | | -1. [Create a release in GitHub](https://help.github.com/en/github/administering-a-repository/creating-releases) |
51 | | - that contains the elements listed above that have been created in the `out` |
52 | | - folder |
53 | | -1. Create a branch `release-0.x` for a minor release for backports and bug fixes. |
| 48 | +### Tags |
54 | 49 |
|
55 | | -### Permissions |
| 50 | +First we create a primary release tag, that triggers release note creation and |
| 51 | +image building processes. |
56 | 52 |
|
57 | | -Releasing requires a particular set of permissions. |
| 53 | +- Create a signed, annotated tag with: `git tag -s -a v1.x.y -m v1.x.y` |
| 54 | +- Push the tags to the GitHub repository: `git push origin v1.x.y` |
58 | 55 |
|
59 | | -- Tag push access to the GitHub repository |
60 | | -- GitHub Release creation access |
| 56 | +This triggers two things: |
61 | 57 |
|
62 | | -## Impact on Metal3 |
| 58 | +- GitHub action workflow for automated release process creates a draft release |
| 59 | + in GitHub repository with correct content, comparing the pushed tag to |
| 60 | + previous tag |
| 61 | +- Quay starts building release image with the release tag |
63 | 62 |
|
64 | | -Multiple additional actions are required in the Metal3 project |
| 63 | +We also need to create one or more tags for the Go modules ecosystem: |
65 | 64 |
|
66 | | -### Update CAPM3 |
| 65 | +- For any subdirectory with `go.mod` in it (excluding `hack/tools`), create |
| 66 | + another Git tag with directory prefix, ie. |
| 67 | + `git tag -s -a api/v1.x.y -m api/v1.x.y`. |
67 | 68 |
|
68 | | -CAPM3 should use the latest version. Changes are required there to pull the |
69 | | -latest version. |
| 69 | +### Release artifacts |
70 | 70 |
|
71 | | -### Update Metal3-dev-env |
| 71 | +We need to verify all release artifacts are correctly built or generated by |
| 72 | +the release workflow. For a release, we should have the following artifacts: |
72 | 73 |
|
73 | | -Metal3-dev-env variables need to be modified. After a major or minor release, |
74 | | -the new minor version should point to main for |
75 | | -IPAM and the released version should point to the release branch. |
| 74 | +Git tags pushed: |
76 | 75 |
|
77 | | -### Update the image of IPAM in the release branch |
| 76 | +- Primary release tag: `v1.x.y` |
| 77 | +- Go module tag: `api/v1.x.y` |
78 | 78 |
|
79 | | -If you just created a release branch (i.e. minor version release), you should |
80 | | -modify the image for IPAM deployment in this branch to be tagged with the |
81 | | -branch name. The image will then follow the branch. |
| 79 | +Container images built and tagged at Quay registry: |
| 80 | + |
| 81 | +- [ip-address-manager:v1.x.y](https://quay.io/repository/metal3-io/ip-address-manager?tab=tags) |
| 82 | + |
| 83 | +Files included in the release page: |
| 84 | + |
| 85 | +- A manifest file - `ipam-components.yaml` |
| 86 | + |
| 87 | +### Release notes |
| 88 | + |
| 89 | +Next step is to clean up the release note manually. |
| 90 | + |
| 91 | +- Check for duplicates, reverts, and incorrect classifications of PRs, and |
| 92 | + whatever release creation tagged to be manually checked. |
| 93 | +- For any superseded PRs (like CAPI uplifts, or commit revertions) that provide |
| 94 | + no value to the release, create a summary line in `Superseded` section with |
| 95 | + the PR ids and summary title. This way the changes are acknowledged to be part |
| 96 | + of the release, but not overwhelming the important changes contained by the |
| 97 | + release. |
| 98 | +- If the release you're making isn't the latest release (new |
| 99 | + minor or major, or new patch release in the latest minor release), |
| 100 | + uncheck the box for latest release. |
| 101 | +- If it is a release candidate (RC) or a pre-release, tick pre-release box. |
| 102 | +- Publish the release. |
| 103 | + |
| 104 | +## Impact on Metal3 if new minor was released |
| 105 | + |
| 106 | +Patch release process is complete, but further additional actions are required |
| 107 | +in the Metal3 project to take in the new major/minor release. These steps are |
| 108 | +documented in |
| 109 | +[CAPM3 release process](https://github.com/metal3-io/cluster-api-provider-metal3/blob/main/docs/releasing.md) |
| 110 | + |
| 111 | +## Announcements |
| 112 | + |
| 113 | +We announce the release in Kubernetes slack on `#cluster-api-baremetal` channel |
| 114 | +and through the `metal3-dev` group mailing list. |
0 commit comments