Skip to content

Commit 33ece13

Browse files
committed
script and doc updates
1 parent e4a53a1 commit 33ece13

File tree

4 files changed

+83
-65
lines changed

4 files changed

+83
-65
lines changed

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

Lines changed: 29 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ git checkout -b v1.3.x
5050
git push -u upstream v1.3.x
5151
```
5252

53-
### 2. Create and push a release commit
53+
### 1. Create and push a release commit
5454

5555
Create a new branch to push the release commit:
5656

@@ -81,23 +81,23 @@ git commit -m "Release v1.3.0"
8181
git push -u origin release-v1.3.0
8282
```
8383

84-
### 3. Create and merge a new PR
84+
### 2. Create and merge a new PR
8585

8686
Create and merge a new PR for the above commit.
8787

88-
### 4. Lock down branch `master`
88+
### 3. Lock down branch `master`
8989

9090
Lock down the `master` branch to prevent further commits before the release completes.
9191
See [this section](#locking-down-branches) for steps to do so.
9292

93-
### 5. Create and push a release tag
93+
### 4. Create and push a release tag
9494

9595
```sh
9696
make tag RELEASE_VERSION=v1.3.0
9797
git push upstream v1.3.0
9898
```
9999

100-
### 6. Fast-forward the `latest` and release branches
100+
### 5. Fast-forward the `latest` and release branches
101101

102102
The `latest` branch points to the latest release tag to keep the main website subdomain up-to-date.
103103
Run the following commands to do so:
@@ -116,29 +116,27 @@ git reset --hard tags/v1.3.0
116116
git push -f upstream v1.3.x
117117
```
118118

119-
### 7. Unlock the `master` branch
119+
### 6. Unlock the `master` branch
120120

121121
See [this guide](#unlocking-branches) for steps to do so.
122122

123+
### 7. Post release steps
124+
125+
See the [post-release section](#post-release-steps).
126+
123127

124128
## Patch releases
125129

126130
We will use the `v1.3.1` release version in this example.
127131

128-
### 1. Check out the release branch
132+
### 1. Create and push a release commit
129133

130-
The release branch should already exist for the desired minor version:
134+
Create a new branch from the release branch, which should already exist for the desired minor version,
135+
to push the release commit to:
131136

132137
```sh
133138
git checkout v1.3.x
134139
git pull
135-
```
136-
137-
### 2. Create and push a release commit
138-
139-
Create a new branch to push the release commit:
140-
141-
```sh
142140
git checkout -b release-v1.3.1
143141
```
144142

@@ -161,23 +159,23 @@ git commit -m "Release v1.3.1"
161159
git push -u origin release-v1.3.1
162160
```
163161

164-
### 3. Create and merge a new PR
162+
### 2. Create and merge a new PR
165163

166164
Create and merge a new PR for the above commit.
167165

168-
### 4. Lock down the `v1.3.x` branch
166+
### 3. Lock down the `v1.3.x` branch
169167

170168
Lock down this branch prevents further commits before the release completes.
171169
See [this section](#locking-down-branches) for steps to do so.
172170

173-
### 5. Create and push a release tag
171+
### 4. Create and push a release tag
174172

175173
```sh
176174
make tag RELEASE_VERSION=v1.3.1
177175
git push upstream v1.3.1
178176
```
179177

180-
### 6. Fast-forward the `latest` branch
178+
### 5. Fast-forward the `latest` branch
181179

182180
The `latest` branch points to the latest release tag to keep the main website subdomain up-to-date.
183181
Run the following commands to do so:
@@ -188,10 +186,13 @@ git reset --hard tags/v1.3.1
188186
git push -f upstream latest
189187
```
190188

191-
### 7. Unlock the `v1.3.x` branch
189+
### 6. Unlock the `v1.3.x` branch
192190

193191
See [this guide](#unlocking-branches) for steps to do so.
194192

193+
### 7. Post release steps
194+
195+
See the [post-release section](#post-release-steps).
195196

196197
## Further reading
197198

@@ -236,22 +237,20 @@ Make sure everyone in the relevant Slack channel is aware of the release so they
236237
237238
##### Unlocking branches
238239
239-
<<<<<<< HEAD
240-
### 11. Announce the release
240+
Unlock a branch by changing the number of required approving reviewers back to 1.
241+
242+
### Post-release steps
241243
242-
Send an email to the [mailing list][mailing-list]
244+
##### Announce the release
245+
246+
Send an email to the [mailing list][mailing-list].
243247
Post to Kubernetes slack in #kubernetes-operators and #operator-sdk-dev.
244248
245-
### 12. Bump open issues to the next release.
249+
##### Bump open issues to the next release.
246250
247251
In the [GitHub milestone][gh-milestones], bump any open issues to the
248252
following release.
249253
250-
---
251-
=======
252-
Unlock a branch by changing the number of required approving reviewers back to 1.
253-
>>>>>>> automate prerelease commit, clean up release guide
254-
255254
256255
[git]:https://git-scm.com/downloads
257256
[gpg2]:https://gnupg.org/download/
@@ -260,14 +259,6 @@ Unlock a branch by changing the number of required approving reviewers back to 1
260259
[netlify-deploy]:https://docs.netlify.com/site-deploys/overview/#deploy-summary
261260
[doc-owners]: https://github.com/operator-framework/operator-sdk/blob/master/OWNERS
262261
[release-page]:https://github.com/operator-framework/operator-sdk/releases
263-
<<<<<<< HEAD
264-
[homebrew]:https://brew.sh/
265-
[homebrew-formula]:https://github.com/Homebrew/homebrew-core/blob/master/Formula/operator-sdk.rb
266-
[homebrew-readme]:https://github.com/Homebrew/homebrew-core/blob/master/CONTRIBUTING.md#to-submit-a-version-upgrade-for-the-foo-formula
267-
[homebrew-repo]:https://github.com/Homebrew/homebrew-core
268-
[sdk-samples-repo]:https://github.com/operator-framework/operator-sdk-samples
262+
[backports]:/docs/upgrading-sdk-version/backport-policy
269263
[mailing-list]:https://groups.google.com/g/operator-framework
270264
[gh-milestones]:https://github.com/operator-framework/operator-sdk/milestones
271-
=======
272-
[backports]:/docs/upgrading-sdk-version/backport-policy
273-
>>>>>>> automate prerelease commit, clean up release guide

website/content/en/docs/installation/install-operator-sdk.md

Lines changed: 32 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -28,55 +28,62 @@ brew install operator-sdk
2828

2929
## Install from GitHub release
3030

31-
### Download the release binaries
31+
### 1. Download the release binary
32+
33+
Set platform information:
3234

3335
```sh
34-
# Linux
35-
curl -Lo operator-sdk https://github.com/operator-framework/operator-sdk/releases/latest/download/operator-sdk_"$(uname -m)"_linux
36-
# macOS
37-
curl -Lo operator-sdk https://github.com/operator-framework/operator-sdk/releases/latest/download/operator-sdk_"$(uname -m)"_darwin
36+
export ARCH=$(case $(arch) in x86_64) echo -n amd64 ;; aarch64) echo -n arm64 ;; *) echo -n $(arch) ;; esac)
37+
export OS=$(uname | awk '{print tolower($0)}')
3838
```
3939

40-
#### Verify the downloaded release binaries
40+
Download the binary for your platform, checksums, and checksum signature:
4141

4242
```sh
43-
curl -LO https://github.com/operator-framework/operator-sdk/releases/latest/download/checksums.txt
43+
curl -LO https://github.com/operator-framework/operator-sdk/releases/latest/download/operator-sdk_${OS}_${ARCH}
4444
```
4545

46-
To verify a release binary using the provided asc files, place the binary and corresponding asc file into the same directory and use the corresponding command:
46+
### 2. Verify the downloaded binary
47+
48+
Import the operator-sdk release GPG key:
4749

4850
```sh
49-
gpg --verify ./operator-sdk
51+
gpg --recv-keys <TODOCIKEY>
5052
```
5153

52-
If you do not have the maintainers public key on your machine, you will get an error message similar to this:
54+
Download the checksums file and its signature, then verify the signature:
5355

54-
```console
55-
$ gpg --verify operator-sdk
56-
gpg: assuming signed data in './operator-sdk.asc'
57-
gpg: Signature made Fri Apr 5 20:03:22 2019 CEST
58-
gpg: using RSA key <KEY_ID>
59-
gpg: Can\'t check signature: No public key
56+
```sh
57+
curl -LO https://github.com/operator-framework/operator-sdk/releases/latest/download/checksums.txt
58+
curl -LO https://github.com/operator-framework/operator-sdk/releases/latest/download/checksums.txt.asc
59+
gpg -u <TODOCIID> --verify checksums.txt.asc
6060
```
6161

62-
To download the key, use the following command, replacing `$KEY_ID` with the "RSA key" string provided in the output of the previous command:
62+
You should see something similar to the following:
6363

64-
```sh
65-
gpg --recv-key "$KEY_ID"
64+
```console
65+
gpg: assuming signed data in 'checksums.txt'
66+
gpg: Signature made Fri 30 Oct 2020 12:15:15 PM PDT
67+
gpg: using RSA key ADE83605E945FA5A1BD8639C59E5B47624962185
68+
gpg: Good signature from "Travis CI <[email protected]>" [ultimate]
6669
```
6770

68-
You'll need to specify a key server if one hasn't been configured. For example:
71+
Make sure the checksums match:
6972

7073
```sh
71-
gpg --keyserver keyserver.ubuntu.com --recv-key "$KEY_ID"
74+
grep operator-sdk_${OS}_${ARCH} checksums.txt | sha256sum -c -
7275
```
7376

74-
Now you should be able to verify the binary.
77+
You should see something similar to the following:
78+
79+
```console
80+
operator-sdk_linux_amd64: OK
81+
```
7582

76-
### Install the release binary in your PATH
83+
### 3. Install the release binary in your PATH
7784

7885
```sh
79-
chmod +x operator-sdk && sudo mv operator-sdk /usr/local/bin/
86+
chmod +x operator-sdk_${OS}_${ARCH} && sudo mv operator-sdk_${OS}_${ARCH} /usr/local/bin/operator-sdk
8087
```
8188

8289
## Compile and install from master
@@ -96,7 +103,7 @@ make install
96103
```
97104

98105
**Note:** Ensure that your `GOPROXY` is set with its default value for Go
99-
versions 1.15+ which is `https://proxy.golang.org,direct`.
106+
versions 1.15+ which is `https://proxy.golang.org|direct`.
100107

101108
[homebrew_tool]:https://brew.sh/
102109
[git_tool]:https://git-scm.com/downloads

website/scripts/set_version.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
11
#!/usr/bin/env bash
22

3+
# This script updates the hugo config's "version_menu" param
4+
# to the current ${MAJOR}.${MINOR} string.
5+
36
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
7+
CONFIG_PATH="${DIR}/../config.toml"
48

59
BRANCH_NAME="$(git rev-parse --abbrev-ref HEAD)"
610
if [[ "$BRANCH_NAME" =~ v[0-9]+\.[0-9]+\.x ]]; then
711
VERSION_MENU="$(echo $BRANCH_NAME | awk -F. '{ print v$1"."$2 }')"
8-
sed -i -E 's/version_menu = ".+"/version_menu = "'${VERSION_MENU}'"/g' "${DIR}"/../config.toml
12+
sed -i -E 's/version_menu = ".+"/version_menu = "'${VERSION_MENU}'"/g' "$CONFIG_PATH"
13+
14+
# Ensure config.toml was updated.
15+
if ! grep -q "version_menu = \"${VERSION_MENU}\"" "$CONFIG_PATH"; then
16+
echo "$0 failed to update config.toml"
17+
exit 1
18+
fi
919
fi

website/scripts/update_mappings.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#!/usr/bin/env bash
22

3+
# This script writes a branch-to-subdomain mapping for the previously created
4+
# release branch to the hugo config. This change should be committed in the prerelease commit.
5+
36
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
7+
CONFIG_PATH="${DIR}/../config.toml"
48

59
VERSION="${1?"A Version is required"}"
610
VERSION_PATCHLESS="$(echo $VERSION | awk -F. '{ print v$1"."$2 }')"
@@ -14,4 +18,10 @@ fi
1418
MARKER="##RELEASE_ADDME##"
1519
PARAMS_VERSION="[[params.versions]]\\n version = \"${VERSION_PATCHLESS}\"\\n url = \"https://${VERSION_X_DOMAIN}.sdk.operatorframework.io\""
1620

17-
sed -i -E $'s@'${MARKER}'@'"${MARKER}\\n\\n${PARAMS_VERSION}"'@g' "${DIR}"/../config.toml
21+
sed -i -E $'s@'${MARKER}'@'"${MARKER}\\n\\n${PARAMS_VERSION}"'@g' "$CONFIG_PATH"
22+
23+
# Ensure config.toml was updated.
24+
if ! grep -q "url = \"https://${VERSION_X_DOMAIN}.sdk.operatorframework.io\"" "$CONFIG_PATH"; then
25+
echo "$0 failed to update config.toml"
26+
exit 1
27+
fi

0 commit comments

Comments
 (0)