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: website/content/en/docs/contribution-guidelines/releasing.md
+43-32Lines changed: 43 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ assuming the upstream SDK is the `upstream` remote repo:
45
45
git checkout -b v1.3.x
46
46
git push -u upstream v1.3.x
47
47
```
48
-
1. Make sure that the list of supported OLM versions stated in the [Overview][overview] section of SDK docs is updated. If a new version of OLM needs to be officially supported, follow the steps in [updating OLM bindata](#updating-olm-bindata) section.
48
+
1. Make sure that the list of supported OLM versions stated in the [Overview][overview] section of SDK docs is updated. If a new version of OLM needs to be officially supported, follow the steps in [updating OLM bindata](#updating-olm-bindata) section.
49
49
1. Create and merge a commit that updates the top-level [Makefile] variable `IMAGE_VERSION`
50
50
to the upcoming release tag `v1.3.0`. This variable ensures sample projects have been tagged
51
51
correctly prior to the release commit.
@@ -135,23 +135,18 @@ git push -f upstream v1.3.x
135
135
136
136
We will use the `v1.3.1` release version in this example.
137
137
138
-
###Before starting
138
+
#### 0. Lock down release branches on GitHub
139
139
140
-
1. Create and merge a commit that updates the top-level [Makefile] variable `IMAGE_VERSION`
141
-
to the upcoming release tag `v1.3.1`. This variable ensures sample projects have been tagged
142
-
correctly prior to the release commit.
143
-
```sh
144
-
sed -i -E 's/(IMAGE_VERSION = ).+/\1v1\.3\.1/g' Makefile
145
-
```
146
-
1. Lock down the `v1.3.x` branch to prevent further commits before the release completes:
147
-
1. Go to `Settings -> Branches` in the SDK repo.
148
-
1. Under `Branch protection rules`, click `Edit` on the `v.*` branch rule.
149
-
1. In section `Protect matching branches` of the `Rule settings` box, increase the number of required approving reviewers to 6.
140
+
Lock down the `v1.3.x` branch to prevent further merges/commits.
150
141
151
-
### 1. Create and push a release commit
142
+
To do this, edit the `Branch protection rules`: https://github.com/operator-framework/operator-sdk/settings/branches
143
+
144
+
- click `Edit` on the `v.*` branch rule.
145
+
- In section `Protect matching branches` of the `Rule settings` box, set "Required approving reviewers" to `6`.
152
146
153
-
Create a new branch from the release branch, which should already exist for the desired minor version,
154
-
to push the release commit to:
147
+
#### 1. Branch
148
+
149
+
Create a new branch from the release branch (v1.3.x in this example). This branch should already exist prior to cutting a patch release.
155
150
156
151
```sh
157
152
export RELEASE_VERSION=v1.3.1
@@ -160,45 +155,61 @@ git pull
160
155
git checkout -b release-$RELEASE_VERSION
161
156
```
162
157
163
-
Run the pre-release `make` target:
164
158
165
-
```sh
159
+
#### 2. Prepare the release commit
160
+
161
+
Using the version for your release as the IMAGE_VERSION, execute the
162
+
following commands from the root of the project.
163
+
164
+
```sh
165
+
# Update the IMAGE_VERSION in the Makefile
166
+
sed -i -E 's/(IMAGE_VERSION = ).+/\1v1\.3\.1/g' Makefile
167
+
# Run the pre-release `make` target:
166
168
make prerelease
169
+
# Regenerate testdata (samples).
170
+
# NOTE: The sanity test will fail but scaffolding should complete.
171
+
make test-sanity
167
172
```
168
173
169
-
The following changes should be present:
174
+
All of the following changes should be present (and no others).
170
175
171
-
-`changelog/generated/v1.3.0.md`: commit changes (created by changelog generation).
172
-
-`changelog/fragments/*`: commit deleted fragment files (deleted by changelog generation).
176
+
- Makefile: IMAGE_VERSION should be modified to the upcoming release tag. (This variable ensures sampleprojects have been tagged correctpy priror to the release commit.)
177
+
- changelog/: all fragments should be deleted and consolidated into the new file `changelog/generated/v1.3.1.md`
178
+
- docs: If there are migration steps, a new migration doc will be created. The installation docs should also contain a link update.
179
+
- testdata/: Generated samples and tests should have version bumps
173
180
174
-
Commit these changes and push:
181
+
Commit these changes and push these changes **to your fork**:
175
182
176
183
```sh
177
184
git add --all
178
-
git commit -m"Release $RELEASE_VERSION"
185
+
git commit -sm"Release $RELEASE_VERSION"
179
186
git push -u origin release-$RELEASE_VERSION
180
187
```
181
188
182
-
###2. Create and merge a new PR
189
+
#### 3. Create and merge Pull Request
183
190
184
-
Create and merge a new PR for the commit created in step 1. You can force-merge your PR to the locked-down `v1.3.x`
185
-
if you have admin access to the operator-sdk repo, or ask an administrator to do so.
191
+
- Create a pull request against the `v1.3.x` branch.
192
+
- Once approving review is given, merge. You may have to unlock the branch by setting
193
+
"required approving reviewers" to back to `1`. (See step 0).
186
194
187
-
###3. Unlock the `v1.3.x` branch
195
+
#### 4. Create a release tag
188
196
189
-
Unlock the branch by changing the number of required approving reviewers in the `v.*` branch rule back to 1.
190
-
191
-
### 4. Create and push a release tag
197
+
Pull down `v1.3.x` and tag it.
192
198
193
199
```sh
200
+
git checkout v1.3.x
201
+
git pull upstream v1.3.x
194
202
make tag
195
203
git push upstream refs/tags/$RELEASE_VERSION
196
204
```
197
205
198
206
### 5. Fast-forward the `latest` branch
199
207
200
-
The `latest` branch points to the latest release tag to keep the main website subdomain up-to-date.
201
-
Run the following commands to do so:
208
+
If the patch release is on the latest y-stream (in the example you would
209
+
not ff latest if there was a y-stream for v1.4.x), you will need to
210
+
fast-forward the `latest` git branch.
211
+
212
+
(The `latest` branch points to the latest release tag to keep the main website subdomain up-to-date.)
202
213
203
214
```sh
204
215
git checkout latest
@@ -272,7 +283,7 @@ GitHub releases live under the [`Releases` tab][release-page] in the operator-sd
272
283
273
284
Prior to an Operator SDK release, add bindata (if required) for a new OLM version by following these steps:
274
285
275
-
1. Add the new version to the [`OLM_VERSIONS`][olm_version] variable in the Makefile.
286
+
1. Add the new version to the [`OLM_VERSIONS`][olm_version] variable in the Makefile.
276
287
2. Remove the *lowest* version from that variable, as `operator-sdk` only supports 3 versions at a time.
277
288
3. Run `make bindata`.
278
289
4. Update the list of supported OLM versions stated in the [`Overview`][overview] section of SDK documentation is updated.
0 commit comments