Skip to content

Commit 69495b4

Browse files
authored
Polish patch release documentation (#4897)
* Polish patch release documentation Signed-off-by: austin <[email protected]> * Fix broken link updater Signed-off-by: austin <[email protected]>
1 parent cae12a2 commit 69495b4

File tree

2 files changed

+44
-33
lines changed

2 files changed

+44
-33
lines changed

website/content/en/docs/contribution-guidelines/releasing.md

Lines changed: 43 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ assuming the upstream SDK is the `upstream` remote repo:
4545
git checkout -b v1.3.x
4646
git push -u upstream v1.3.x
4747
```
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.
4949
1. Create and merge a commit that updates the top-level [Makefile] variable `IMAGE_VERSION`
5050
to the upcoming release tag `v1.3.0`. This variable ensures sample projects have been tagged
5151
correctly prior to the release commit.
@@ -135,23 +135,18 @@ git push -f upstream v1.3.x
135135

136136
We will use the `v1.3.1` release version in this example.
137137

138-
### Before starting
138+
#### 0. Lock down release branches on GitHub
139139

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

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

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

156151
```sh
157152
export RELEASE_VERSION=v1.3.1
@@ -160,45 +155,61 @@ git pull
160155
git checkout -b release-$RELEASE_VERSION
161156
```
162157

163-
Run the pre-release `make` target:
164158

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:
166168
make prerelease
169+
# Regenerate testdata (samples).
170+
# NOTE: The sanity test will fail but scaffolding should complete.
171+
make test-sanity
167172
```
168173

169-
The following changes should be present:
174+
All of the following changes should be present (and no others).
170175

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
173180

174-
Commit these changes and push:
181+
Commit these changes and push these changes **to your fork**:
175182

176183
```sh
177184
git add --all
178-
git commit -m "Release $RELEASE_VERSION"
185+
git commit -sm "Release $RELEASE_VERSION"
179186
git push -u origin release-$RELEASE_VERSION
180187
```
181188

182-
### 2. Create and merge a new PR
189+
#### 3. Create and merge Pull Request
183190

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).
186194

187-
### 3. Unlock the `v1.3.x` branch
195+
#### 4. Create a release tag
188196

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

193199
```sh
200+
git checkout v1.3.x
201+
git pull upstream v1.3.x
194202
make tag
195203
git push upstream refs/tags/$RELEASE_VERSION
196204
```
197205

198206
### 5. Fast-forward the `latest` branch
199207

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.)
202213

203214
```sh
204215
git checkout latest
@@ -272,7 +283,7 @@ GitHub releases live under the [`Releases` tab][release-page] in the operator-sd
272283

273284
Prior to an Operator SDK release, add bindata (if required) for a new OLM version by following these steps:
274285

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.
276287
2. Remove the *lowest* version from that variable, as `operator-sdk` only supports 3 versions at a time.
277288
3. Run `make bindata`.
278289
4. Update the list of supported OLM versions stated in the [`Overview`][overview] section of SDK documentation is updated.

website/scripts/update_download_url.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ DOC_PATH="${DIR}/../content/en/docs/installation/_index.md"
1010

1111
VERSION="${1?"A Version is required"}"
1212

13-
TARGET="export OPERATOR_SDK_DL_URL=https://github.com/operator-framework/operator-sdk/releases/"
13+
TARGET="export OPERATOR_SDK_DL_URL=https://github.com/operator-framework/operator-sdk/releases/download/"
1414

1515
sed -i -E 's@('"${TARGET}"').+@\1'"${VERSION}"'@g' "$DOC_PATH"
1616

0 commit comments

Comments
 (0)