Skip to content

Commit c401ddd

Browse files
authored
Add release docs for Access Operator (#101)
Signed-off-by: Kate Stanley <[email protected]>
1 parent 3d1defc commit c401ddd

File tree

2 files changed

+130
-1
lines changed

2 files changed

+130
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ You can contribute by:
117117

118118
All bugs, tasks or enhancements are tracked as [GitHub issues](https://github.com/strimzi/kafka-access-operator/issues).
119119

120-
The [dev guide](https://github.com/strimzi/kafka-access-operator/blob/main/development-docs/DEV_GUIDE.md) describes how to build the operator and how to test your changes before submitting a patch or opening a PR.
120+
The [dev guide](development-docs/DEV_GUIDE.md) describes how to build the operator and how to test your changes before submitting a patch or opening a PR.
121+
The [releasing guide](development-docs/RELEASING.md) describes how to create new releases of the Access Operator.
121122

122123
If you want to get in touch with us first before contributing, you can use:
123124

development-docs/RELEASING.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Releasing Access Operator
2+
3+
This document describes how to release a new version of the Access Operator.
4+
5+
## Regular releases
6+
7+
### Create release branch
8+
9+
Before releasing a new major or minor version of Access Operator, the release branch has to be created.
10+
The release branch should be named as `release-<Major>.<Minor>.x`.
11+
For example for release 1.2.0, the branch should be named `release-1.2.x`.
12+
The release branch is normally created from the `main` branch.
13+
This is normally done locally and the branch is just pushed into the GitHub repository.
14+
15+
When releasing a new patch version, the release branch should already exist.
16+
You just need to cherry-pick bug fixes or add them through PRs.
17+
18+
### Prepare the release
19+
20+
For any new release - major, minor or patch - we need to prepare the release.
21+
The release preparation includes updating the installation files for the new version or changing the version of the Maven project.
22+
23+
1. Move to the release branch and run `make clean`
24+
2. Run the command `RELEASE_VERSION=<NewRealeaseVersion> make release`.
25+
For example, for release 1.2.0, you would run `RELEASE_VERSION=1.2.0 make release`.
26+
* For `RELEASE_VERSION` always use the GA version here (e.g. `1.2.0`) and not the RC version (e.g `1.2.0-rc1`).
27+
* This will automatically update several `pom.xml` files and all files in `packaging/`, `install/`, `example/` and `helm-charts/` folders.
28+
3. Update the checksums for released files in `.checksums` in the release branch.
29+
* Use the Make commands `make checksum_helm`, `make checksum_install`, and make `checksum_examples` to generate the new checksums.
30+
* Update the checksums in the `.checksums` file in the root directory of the GitHub repository.
31+
32+
Review and commit the changes done by the `make` command and push them into the repository (do not add the newly created top level tar.gz and zip archives named like `strimzi-*` into Git).
33+
34+
The build pipeline should automatically start for any new commit pushed into the release branch.
35+
36+
### Running the release pipeline
37+
38+
Wait until the build pipeline is (successfully) finished for the last commit in the release branch.
39+
When it's done:
40+
* Mark the build in the Azure Pipelines UI to be retained forever.
41+
* Copy the build ID (from the URL in Azure Pipelines) to use in the next step.
42+
43+
Then run the release pipeline manually from the Azure Pipelines UI.
44+
The release pipeline is named `access-operator-release`.
45+
46+
> **Note for RCs:**
47+
>
48+
> Release candidates are built with the same release pipeline as the final releases.
49+
> When starting the pipeline, use the RC name as the release version.
50+
> For example `1.2.0-rc1` or `1.2.0-rc2`.
51+
> For release pipelines, you should skip the suffixed build since it is not needed.
52+
53+
When starting the new run, it will ask for several parameters which you need to fill:
54+
55+
* Release version (for example `1.2.0` GA releases, or `1.2.0-rc1` for RCs).
56+
* Release suffix (for example `0` - used to create the suffixed images such as `strimzi/strimzi-access-operator:1.2.0-0` to identify different builds done for example due to base image CVEs. For release candidate pipelines, you should skip the suffixed build since it is not needed).
57+
* Source pipeline ID (currently, only the build pipeline with ID `51` can be used).
58+
* Source build ID (the ID of the build from the release branch - use the long build ID from the URL and not the shorter build number).
59+
60+
The release pipeline will push the images to the registry.
61+
It will also prepare in artifacts the ZIP and TAR.GZ archives with the installation files and the Helm Chart.
62+
You will need these later to attach them to the GitHub release.
63+
64+
Once it completes, mark the build in the Azure Pipelines UI to be retained forever.
65+
66+
### Smoke tests
67+
68+
After the release pipeline is finished, it is always a good idea to do some smoke tests of the images to double-check they were pushed correctly.
69+
Also check the helm chart using the helm show command, e.g.:
70+
```shell
71+
helm show chart oci://quay.io/strimzi-helm/strimzi-access-operator:1.2.0
72+
```
73+
74+
### Creating the release
75+
76+
After the release pipeline is finished, the release has to be created:
77+
78+
1. Tag the right commit from the release branch with the release name (e.g. `git tag 1.2.0`) and push it to GitHub.
79+
2. Go to **Maven Central** > **Publish** to publish the release artifacts.
80+
3. On GitHub, create the release and attach the ZIP / TAR.GZ artifacts from the build pipeline artifacts.
81+
82+
### Post release (_only for GA, not for RCs_)
83+
84+
In the Access Operator repo create a PR into main to update:
85+
* The `install` directory.
86+
* The `helm-charts` directory.
87+
* The `examples` directory.
88+
* The checksums in the `checksums` file.
89+
* The version to the next SNAPSHOT version.
90+
* To do this run the `next_version` `make` target: `NEXT_VERSION=1.3.0-SNAPSHOT make next_version`
91+
* This updates the `pom.xml` files and the `release.version` file.
92+
93+
In the Strimzi cluster opertor repo create a PR into main to update:
94+
* The `packaging/install/access-operator` directory.
95+
* The `packaging/examples/kafka-access` directory.
96+
* The `access-operator.version` property in the `pom.xml` file.
97+
* The `CHANGELOG.md` to state that the Strimzi Access Operator files have been updated to a new version.
98+
99+
### Announcements
100+
101+
Announce the release on following channels:
102+
* Mailing lists
103+
* Slack
104+
* Social accounts (if the release is significant enough)
105+
106+
## Rebuilding container images for base image CVEs
107+
108+
In case of a CVE in the base container image, we might need to rebuild the Access Operator container image.
109+
This can be done using the `access-operator-cve-rebuild` pipeline.
110+
This pipeline will take previously built binaries and use them to build a new container image.
111+
It will also automatically run the system tests and push the container image to the container registry with the suffixed tag (e.g. `1.2.0-2`).
112+
Afterwards, it will wait for manual approval.
113+
This gives additional time to manually test the new container image.
114+
After the manual approval, the image will be also pushed under the tag without suffix (e.g. `1.2.0`).
115+
116+
The suffix can be specified when starting the re-build pipeline.
117+
You should always check what the previous suffix was and increment it.
118+
That way, the older images will still be available in the container registry under their own suffixes and only the latest rebuild will be available under the un-suffixed tag.
119+
120+
When starting the pipeline, it will ask for several parameters which you need to fill in:
121+
122+
* Release version (for example `1.2.0`).
123+
* Release suffix (for example `0` - used to create the suffixed images such as `strimzi/strimzi-access-operator:1.2.0-2` to identify different builds done for different CVEs).
124+
* Source pipeline ID (Currently, only the build pipeline with ID `51` can be used).
125+
* Source build ID (the ID of the build from which the artifacts should be used - use the long build ID from the URL and not the shorter build number)
126+
127+
This process should be used only for CVEs in the base images.
128+
Any CVEs in our code or in the Java dependencies require new patch (or minor) release.

0 commit comments

Comments
 (0)