You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/dev/release.md
+61-15Lines changed: 61 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,34 +1,37 @@
1
1
# Atlas Operator Release Instructions
2
2
3
+
For the various PRs involved, seek at least someone else to approve. In case of doubts, engage the team member(s) who might be able to clarify and seek their review as well.
4
+
5
+
## Prerequisites
6
+
7
+
To get PRs to be auto-committed for RedHat community & Openshift you need to make sure you are listed in the [team members ci.yaml list for community-operators](https://github.com/k8s-operatorhub/community-operators/blob/main/operators/mongodb-atlas-kubernetes/ci.yaml) and [team members ci.yaml list for community-operators-prod](https://github.com/redhat-openshift-ecosystem/community-operators-prod/blob/main/operators/mongodb-atlas-kubernetes/ci.yaml).
8
+
9
+
This is not required for [Certified Operators](https://github.com/redhat-openshift-ecosystem/certified-operators/blob/main/operators/mongodb-atlas-kubernetes/ci.yaml).
10
+
11
+
Finally, make sure you have a "RedHat Connect" account and are a [team member with org administrator role in the team list](https://connect.redhat.com/account/team-members).
12
+
3
13
## Create the release branch
4
14
5
-
Use the GitHub UI to create the new "Release Branch" workflow. Specify the version to be released in the text box.
15
+
Use the GitHub UI to create the new "Create Release Branch" workflow. Specify the version to be released in the text box.
6
16
The deployment scripts (K8s configs, OLM bundle) will be generated and PR will be created with new changes on behalf
7
17
of the `github-actions` bot.
8
18
9
-
NOTE: The X- and Y- stream releases should only be launched using the workflow from the MAIN branch. Z-stream (patch)
10
-
releases can be launched from a separate branch
11
-
12
-
The release creation will fail if the file `major-version` contents does not match the major version to be released. This file explicitly means the upcoming release is for a particular major version, with potential breaking changes. This allows us to:
13
-
14
-
1. Notice if we forgot to update the `major-version` file before releasing the next major version.
15
-
2. Notice if we tried to re-release an older major version when the code is already prepared for the next major version.
16
-
3. Skip some tests, like `helm update`, when crossing from one major version to the next, as such test is not expected to work across incompatible major version upgrades.
19
+
Pass the version with the `X.Y.Z` eg. `1.2.3`, **without** the `v...` prefix.
17
20
18
-
If the create release branch job fails due an error such as `Bad major version for X... expected Y..`, review whether or not the `major-version` file was updated as expected. Check as well you are not trying to release a patch for the older major version from the new majorversion codebase.
21
+
See [Troubleshooting](#troubleshooting) in case of issues, such as [errors with the majorversion](#major-version-issues-when-create-release-branch).
19
22
20
23
## Approve the Pull Request named "Release x.y.z"
21
24
22
-
Review the Pull Request. Approve and merge it to main.
25
+
Review the Pull Request. Approve and merge it to `main`.
23
26
The new job "Create Release" will be triggered and the following will be done:
24
-
* Atlas Operator image built and pushed to dockerhub
27
+
* Atlas Operator image is built and pushed to DockerHub
25
28
* Draft Release will be created with all commits since the previous release
26
29
27
-
Once the Pull Request is approved, a tag is created out of the branch, which can then be discarded. A branch `release/X.Y.Z`will imply a tag `vX.Y.Z`, and `pre-release/X.Y.Z-...` will imply `vX.Y.Z-...`. The `tag.yml` workflow is the one responsible for creating such tag and triggering the release process workflow (`release-post-merge.yml`).
30
+
The "Create Release Branch" workflow is going to create a Pull Request pointing to a `release/X.Y.Z`branch. Once approved and merged, automation is going to create a `vX.Y.Z`tag.
28
31
29
32
## Edit the Release Notes and publish the release
30
33
31
-
Follow the format described in the release-notes-template.md file. Publish the release.
34
+
Follow the format described in the [release-notes-template.md](../release-notes/release-notes-template.md) file. Before publishing the release, keep the release in Draft and get an approval from the team and Product Management. Once approved, publish the release.
32
35
33
36
## Synchronize configuration changes with the Helm Charts
34
37
@@ -49,7 +52,12 @@ All bundles/package manifests for Operators for operatorhub.io reside in the fol
49
52
50
53
### Fork/Update the community operators repositories
51
54
52
-
**Note**: this has to be done once only:
55
+
**Note**: this has to be done once only.
56
+
57
+
First ensure your SSH keys in [https://github.com/settings/keys] are authorized for `mongodb-forks` MongoDB SSO.
58
+
59
+
Execute the following steps:
60
+
53
61
1. Clone each of the above forked OLM repositories from https://github.com/mongodb-forks
54
62
2. Add `upstream` remotes
55
63
3. Export each cloned repository directory in environment variables
@@ -145,6 +153,32 @@ You can see an [example fixed PR here for certified version 1.9.1](https://githu
145
153
146
154
After the PR is approved it will soon appear in the [Atlas Operator openshift cluster](https://console-openshift-console.apps.atlas.operator.mongokubernetes.com)
147
155
156
+
# SSDLC checklist publishing
157
+
158
+
For the time being, preparing the SSDLC checklist for each release is a manual process. Use this [past PR as a starting point](https://github.com/mongodb/mongodb-atlas-kubernetes/pull/1524).
159
+
160
+
Copy the closest [sdlc-compliance.md](../releases/v2.2.1/sdlc-compliance.md) file and:
161
+
- Update the **version** references to the one being released.
162
+
- Update dates and release creators of the current release.
163
+
164
+
Update the image signature instructions to match the current version.
165
+
166
+
Generate the `linux-amd64.sbom.json` and `linux-arm64.sbom.json` SBOM files and place them in the same directory as the compliance doc `docs/releases/vX.Y.Z`:
-`${arch}` is the architecture to generate, either `amd64` or `arm64`.
174
+
-`${version}` is the current version released in `X.Y.Z` format, without the **v** prefix.
175
+
-`${image}` is the image reference released, usually something like `mongodb/mongodb-atlas-kubernetes-operator:${version}`.
176
+
177
+
Create a PR with the following new files included in the `releases/vX.Y.Z` directory:
178
+
-`linux-amd64.sbom.json`
179
+
-`linux-arm64.sbom.json`
180
+
-`sdlc-compliance.md`
181
+
148
182
# Post install hook release
149
183
150
184
If changes have been made to the post install hook (mongodb-atlas-kubernetes/cmd/post-install/main.go).
@@ -171,3 +205,15 @@ git push
171
205
```
172
206
173
207
If the release is a new minor version, then the CLI must be updated with the new version (and any new CRDs) [here](https://github.com/mongodb/mongodb-atlas-cli/blob/master/internal/kubernetes/operator/features/crds.go).
208
+
209
+
## Troubleshooting
210
+
211
+
### Major version issues when executing the "Create Release Branch" workflow
212
+
213
+
The release creation will fail if the file `major-version` contents does not match the major version to be released. This file explicitly means the upcoming release is for a particular major version, with potential breaking changes. This allows us to:
214
+
215
+
1. Notice if we forgot to update the `major-version` file before releasing the next major version.
216
+
2. Notice if we tried to re-release an older major version when the code is already prepared for the next major version.
217
+
3. Skip some tests, like `helm update`, when crossing from one major version to the next, as such test is not expected to work across incompatible major version upgrades.
218
+
219
+
If the create release branch job fails due an error such as `Bad major version for X... expected Y..`, review whether or not the `major-version` file was updated as expected. Check as well you are not trying to release a patch for the older major version from the new major version codebase.
0 commit comments