Skip to content

Commit 966ae1b

Browse files
Merge pull request #225 from Nordix/tuomo/update-releasing-md
📖 update releasing.md
2 parents 0d754e8 + 1e6ac4d commit 966ae1b

File tree

1 file changed

+88
-55
lines changed

1 file changed

+88
-55
lines changed

docs/releasing.md

Lines changed: 88 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,114 @@
1-
# Releasing
1+
# ip-address-manager releasing
22

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.
55

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
137

14-
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
8+
Things you should do before making a release:
159

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
1713

18-
### `docker`
14+
## Permissions
1915

20-
You must have docker installed.
16+
Creating a release requires repository `write` permissions for:
2117

22-
## Output
18+
- Tag pushing
19+
- Branch creation
20+
- GitHub Release publishing
2321

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.
2528

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
2930

30-
### Artifact locations
31+
IPAM uses [semantic versioning](https://semver.org). For version `v1.x.y`:
3132

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
3534

36-
## Creating a release for IPAM
35+
Clone the repository:
36+
`git clone [email protected]:metal3-io/ip-address-manager`
3737

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`.
3940

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`
4147

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
5449

55-
### Permissions
50+
First we create a primary release tag, that triggers release note creation and
51+
image building processes.
5652

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`
5855

59-
- Tag push access to the GitHub repository
60-
- GitHub Release creation access
56+
This triggers two things:
6157

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
6362

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:
6564

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`.
6768

68-
CAPM3 should use the latest version. Changes are required there to pull the
69-
latest version.
69+
### Release artifacts
7070

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:
7273

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:
7675

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`
7878

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

Comments
 (0)