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
Release notes should thoroughly describe changes made to code, documentation, and design of the SDK. PR links should be included wherever possible.
48
+
### Locking down branches
49
+
50
+
Once a release PR has been made and all tests pass, the SDK's `master` branch should be locked so commits cannot happen between the release PR and release tag push. To lock down `master`:
51
+
52
+
1. Go to `Settings -> Branches` in the SDK repo.
53
+
1. Under `Branch protection rules`, click `Edit` on the `master` rule.
54
+
1. In section `Protect matching branches` of the `Rule settings` box, increase the number of required approving reviewers to its maximum allowed value.
55
+
56
+
Now only administrators (maintainers) should be able to force merge PRs. Make sure everyone in the relevant Slack channel is aware of the release so they do not force merge by accident.
57
+
58
+
Unlock `master` after the release has completed (after step 3 is complete) by changing the number of required approving reviewers back to 1.
59
+
60
+
### Releasing
61
+
62
+
The GitHub [`Releases` tab][release-page] in the operator-sdk repo is where all SDK releases live. To create a GitHub release:
63
+
64
+
1. Go to the SDK [`Releases` tab][release-page] and click the `Draft a new release` button in the top right corner.
65
+
1. Select the tag version `v1.3.0`, and set the title to `v1.3.0`.
66
+
1. Copy and paste any `CHANGELOG.md` under the `v1.3.0` header that have any notes into the description form (see [below](#release-notes)).
67
+
1. Attach all binaries and `.asc` signature files to the release by dragging and dropping them.
68
+
1. Click the `Publish release` button.
69
+
70
+
**Note:** if this is a pre-release, make sure to check the `This is a pre-release` box under the file attachment frame. If you are not sure what this means, ask another maintainer.
71
+
72
+
#### Release notes
73
+
74
+
GitHub release notes should thoroughly describe changes made to code, documentation, and design of the SDK. PR links should be included wherever possible.
49
75
50
76
The following sections, often directly copied from our [changelog][doc-changelog], are used as release notes:
51
77
@@ -165,26 +191,26 @@ Create a new branch to push release commits:
165
191
$ git checkout -b release-v1.3.0
166
192
```
167
193
168
-
Commit changes to the following files:
194
+
Commit the following changes:
169
195
170
196
- `version/version.go`: update `Version` to `v1.3.0`.
171
197
- `internal/pkg/scaffold/gopkgtoml.go`, under the `[[constraint]]` for `github.com/operator-framework/operator-sdk`:
172
198
- Comment out `branch = "master"`
173
199
- Un-comment `version = "v1.2.0"`
174
200
- Change `v1.2.0` to `v1.3.0`
175
-
- `internal/pkg/scaffold/gopkgtoml_test.go`: same as for `internal/pkg/scaffold/gopkgtoml.go`.
176
201
- `internal/pkg/scaffold/ansible/gopkgtoml.go`: same as for `internal/pkg/scaffold/gopkgtoml.go`.
177
202
- `internal/pkg/scaffold/helm/gopkgtoml.go`: same as for `internal/pkg/scaffold/gopkgtoml.go`.
178
203
- `internal/pkg/scaffold/go_mod.go`, in the `replace` block for `github.com/operator-framework/operator-sdk`:
179
-
- Add the following `replace` entry: `github.com/operator-framework/operator-sdk => github.com/operator-framework/operator-sdk v1.3.0`.
180
-
- If an entry already exists, change the version to `v1.3.0`.
181
-
- `internal/pkg/scaffold/go_mod_test.go`: same as for `internal/pkg/scaffold/go_mod.go`.
204
+
- Add the following `replace` line to the bottom of `go.mod`: `replace github.com/operator-framework/operator-sdk => github.com/operator-framework/operator-sdk v1.3.0`.
205
+
- If a `replace` line already exists, change the version to `v1.3.0`.
182
206
- `internal/pkg/scaffold/helm/go_mod.go`: same as for `internal/pkg/scaffold/go_mod.go`.
183
207
- `internal/pkg/scaffold/ansible/go_mod.go`: same as for `internal/pkg/scaffold/go_mod.go`.
184
208
- `CHANGELOG.md`: update the `## Unreleased` header to `## v1.3.0`.
185
209
- `doc/user/install-operator-sdk.md`: update the linux and macOS URLs to point to the new release URLs.
186
210
187
-
Create a new PR for `release-v1.3.0`.
211
+
_(Non-patch releases only)_ Lock down the master branch to prevent further commits between this and step 4. See [this section](#locking-down-branches) for steps to do so.
212
+
213
+
Create and merge a new PR for `release-v1.3.0`.
188
214
189
215
### 2. Create a release tag, binaries, and signatures
190
216
@@ -218,9 +244,12 @@ Check out a new branch from master (or use your `release-v1.3.0` branch) and com
218
244
- `internal/pkg/scaffold/gopkgtoml.go`, under the `[[constraint]]` for `github.com/operator-framework/operator-sdk`:
219
245
- Comment out `version = "v1.3.0"`
220
246
- Un-comment `branch = "master"`
221
-
- `internal/pkg/scaffold/gopkgtoml_test.go`: same as for `internal/pkg/scaffold/gopkgtoml.go`.
222
247
- `internal/pkg/scaffold/ansible/gopkgtoml.go`: same as for `internal/pkg/scaffold/gopkgtoml.go`.
223
248
- `internal/pkg/scaffold/helm/gopkgtoml.go`: same as for `internal/pkg/scaffold/gopkgtoml.go`.
249
+
- `internal/pkg/scaffold/go_mod.go`, in the `replace` block for `github.com/operator-framework/operator-sdk`:
250
+
- Remove the `replace` line at the bottom of `go.mod`: `replace github.com/operator-framework/operator-sdk => github.com/operator-framework/operator-sdk v1.3.0`.
251
+
- `internal/pkg/scaffold/helm/go_mod.go`: same as for `internal/pkg/scaffold/go_mod.go`.
252
+
- `internal/pkg/scaffold/ansible/go_mod.go`: same as for `internal/pkg/scaffold/go_mod.go`.
224
253
- `CHANGELOG.md`: add the following as a new set of headers above `## v1.3.0`:
225
254
226
255
```markdown
@@ -243,17 +272,9 @@ If the release is for a patch version (e.g. `v1.3.1`), an identical PR should be
243
272
244
273
### 4. Releasing binaries, signatures, and release notes
245
274
246
-
The final step is to upload binaries, their signature files, and release notes from `CHANGELOG.md`.
275
+
_(Non-patch releases only)_ Unlock the master branch. See [this section](#locking-down-branches) for steps to do so.
247
276
248
-
**Note:** if this is a pre-release, make sure to check the `This is a pre-release` box under the file attachment frame. If you are not sure what this means, ask another maintainer.
249
-
250
-
1. Go to the SDK [release page][release-page] and click the `Draft a new release` button in the top right corner.
251
-
1. Select the tag version `v1.3.0`, and set the title to `v1.3.0`.
252
-
1. Copy and paste any `CHANGELOG.md` under the `v1.3.0` header that have any notes into the description form.
253
-
1. Attach all binaries and `.asc` signature files to the release by dragging and dropping them.
254
-
1. Click the `Publish release` button.
255
-
256
-
You've now fully released a new version of the Operator SDK. Good work! However, there is one more step that needs to be completed: making a release branch to allow us to make patch fixes for this release.
277
+
The final step is to upload binaries, their signature files, and release notes from `CHANGELOG.md` for `v1.3.0`. See [this section](#releasing) for steps to do so.
Note: If there were any changes made to the CLI commands, make sure to look at the existing tests, in case they need updating.
300
321
322
+
You've now fully released a new version of the Operator SDK. Good work! Make sure to follow the post-release steps below.
323
+
324
+
### (Post-release) Updating the operator-sdk-samples repo
325
+
326
+
Many releases change SDK API's and conventions, which are not reflected in the [operator-sdk-samples repo][sdk-samples-repo]. The samples repo should be updated and versioned after each SDK major/minor release with the same tag, ex. `v1.3.0`, so users can refer to the correct operator code for that release.
327
+
328
+
The release process for the samples repo is simple:
329
+
330
+
1. Make changes to all relevant operators (at least those referenced by SDK docs) based on API changes for the new SDK release.
331
+
1. Ensure the operators build and run as expected (see each operator's docs).
332
+
1. Once all API changes are in`master`, create a release tag locally:
333
+
```console
334
+
$ git checkout master && git pull
335
+
$ VER="v1.3.0"
336
+
$ git tag --sign --message "Operator SDK Samples $VER""$VER"
337
+
$ git push --tags
338
+
```
339
+
340
+
### (Post-release) Updating the release notes
341
+
342
+
Add the following line to the top of the GitHub release notes for`v1.3.0`:
343
+
344
+
```md
345
+
**NOTE:** ensure the `v1.3.0` tag is referenced when referring to sample code in the [SDK Operator samples repo](https://github.com/operator-framework/operator-sdk-samples/tree/v1.3.0) forthis release. Linksin SDK documentation are currently set to the samples repo `master` branch.
0 commit comments