Skip to content

Commit c8acf34

Browse files
committed
Add release info
1 parent c370931 commit c8acf34

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed

docs/RELEASE.md

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
## Releasing NetObserv CLI
2+
3+
### Tagging & creating a draft release
4+
5+
This is the process of releasing the NetObserv CLI on GitHub. First, tag from the release branch that you want to publish (make sure you're up to date):
6+
7+
```bash
8+
git fetch upstream
9+
git reset --hard upstream/(release branch)
10+
version="v0.0.6"
11+
git tag -a "$version" -m "$version"
12+
git push upstream --tags
13+
```
14+
15+
When the tag is pushed, a release action is triggered on GitHub: https://github.com/netobserv/network-observability-cli/actions/workflows/release.yml.
16+
17+
When the job completes, you should see a new draft release in https://github.com/netobserv/network-observability-cli/releases.
18+
19+
### Krew
20+
21+
If you haven't already, fork and clone the krew-index repo from https://github.com/kubernetes-sigs/krew-index.
22+
23+
From there, you'll find the NetObserv plugin info in `plugins/netobserv.yaml`.
24+
25+
Copy and paste the YAML snippet provided in draft release on GitHub, into that `netobserv.yaml` file.
26+
27+
To test it, first download the tgz archive from the GitHub release (see the `netobserv-cli.tar.gz` link under "Assets").
28+
29+
Then:
30+
31+
```bash
32+
# uninstall any previous version of the plugin
33+
kubectl krew uninstall netobserv
34+
# reinstall using the current manifest and archive
35+
kubectl krew install --manifest=plugins/netobserv.yaml --archive=/path/to/netobserv-cli.tar.gz
36+
kubectl netobserv version
37+
# output: Netobserv CLI version <the new version>
38+
39+
# smoke-test on a live cluster
40+
kubectl netobserv flows
41+
```
42+
43+
NB: The process to publish a plugin update is also documented in https://krew.sigs.k8s.io/docs/developer-guide/release/updating-plugins/.
44+
45+
### Publish the GitHub release
46+
47+
When tests are OK, edit the draft release in GitHub:
48+
- Remove the text template
49+
- Auto-generate the release note
50+
- Check the "Set as the latest release" box
51+
- Click Publish
52+
53+
### Krew again
54+
55+
Finally, commit the YAML changes and open a pull request:
56+
57+
```bash
58+
git commit -a -s -m "Bump netobserv $version"
59+
git push origin HEAD:bump-$version
60+
```
61+
62+
Note: the first time, you may need to sign the CLA for the Linux Foundation / CNCF. Check your PR for any additional step to take.

0 commit comments

Comments
 (0)