Skip to content

Commit ebc4b09

Browse files
Merge pull request #223 from adambkaplan/operator-release
Initial Release Instructions
2 parents 891b9bd + 1172f85 commit ebc4b09

File tree

3 files changed

+109
-0
lines changed

3 files changed

+109
-0
lines changed

DEVELOPMENT.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,8 @@ Changes that modify the `bundle` directory, however, may require the operator to
5252
deployed with Operator Lifecycle Manager. Refer to the
5353
[OLM development guide](/docs/development/olm-development.md) for instructions on how to build,
5454
deploy, and test the operator with OLM.
55+
56+
## Releasing the Operator
57+
58+
For maintainers who are asked to issue releases, please refer to the
59+
[release process](./docs/development/releasing.md) document.

docs/development/olm-development.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,30 @@ This will run a script that does the following:
5555

5656
Once the script completes, the Shipwright and Tekton operators will be installed on the cluster.
5757

58+
## Testing a Release
59+
60+
To test a release that has not been published to the Kubernetes Operators
61+
[OperatorHub](https://operatorhub.io/), do the following:
62+
63+
### Step 1: Build and Push an Operator Catalog
64+
65+
Like Step 2 above, you will need to publish a catalog containing the candidate operator release.
66+
Run the following command to set the correct `BUNDLE_IMG` for the catalog:
67+
68+
```sh
69+
$ version=<version to test, no leading v> # example: 0.13.0-rc0
70+
$ make catalog-push IMAGE_REPO=<your-registry> VERSION="$version" BUNDLE_IMG="ghcr.io/shipwright-io/operator/operator-bundle:v$version"
71+
```
72+
73+
### Step 2: Deploy the operator
74+
75+
Similar to Step 3 above, deploy the operator with the catalog image:
76+
77+
```sh
78+
$ version=<version to test, no leading `v`> # example: 0.13.0-rc0
79+
$ make catalog-run IMAGE_REPO=<your-registry> VERSION="$version"
80+
```
81+
5882
## Troubleshooting
5983

6084
### `sed` Command Not Found

docs/development/releasing.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Release Process
2+
3+
This document outlines the steps required to release the operator. This document assumes that you
4+
have achieved the "Approver"/"Maintainer" status, and have permission to manually trigger GitHub
5+
Actions on this repo.
6+
7+
## Release Candidates (`X.Y.0-rcN`)
8+
9+
### Step 0: Set Up the Release Branch
10+
11+
Run the "Create Release Branch" GitHub Action, providing a valid Semantic Version with a major and
12+
minor revision number. Example: `v0.13`.
13+
14+
### Step 1: Create a Release Candidate
15+
16+
This is ideal for `.0` releases, where there is most risk of "blocking" bugs. Release candidates
17+
can be skipped for z-stream releases.
18+
19+
Run the "Release" GitHub action, with the following parameters:
20+
21+
- New tag: provide a semantic version _without the leading `v`_. Use a trailing `-` to add patch
22+
suffix. Ex: 0.13.0-rc0.
23+
- Previous tag: provide a semantic version _that matches a tag on the GitHub repo_. Ex: `v0.12.0`.
24+
- Ref: use the branch for the release in question. Ex: `release-v0.13`.
25+
26+
This will draft a release for GitHub - it will not publish a tag or release note.
27+
28+
### Step 2: Publish Draft Release
29+
30+
Find the draft release. Edit the release as follows:
31+
32+
- Add a leading `v` suffix to the generated tag and release name. Ex: `0.13.0-rc0` becomes `v0.13.0-rc0`.
33+
- Change the "Draft release notes" title to "What's Changed".
34+
35+
Once you're happy, publish the draft release note. If an item is missing from the release note,
36+
review the pull requests that should be included. Each desired PR should have:
37+
38+
1. A release note.
39+
2. A `kind/*` label, such as `kind/feature` or `kind/bug`.
40+
41+
### Step 3: Verify the Bundle
42+
43+
Once the release candidate is published, broadcast the candidate build to the community in Slack
44+
and the shipwright-dev mailing list. Refer to the "Testing a Release" section of the
45+
[OLM Development](./olm-development.md#testing-a-release) guide for instructions on how to test the
46+
release candidate.
47+
48+
### Step 4: Triage/Fix bugs
49+
50+
Once the release candidate is published, the community should file any issues as bugs in GitHub. It
51+
is up to maintainers to determine which bugs are "release blockers" and which ones can be addressed
52+
in a future release.
53+
54+
### Step 5: Repeat Release Candidates
55+
56+
Repeat steps 1-4 as needed if a "release blocker" issue is identified.
57+
58+
## Official Releases
59+
60+
Before proceeding with an official release, ensure that the
61+
[release branch](#step-0-set-up-the-release-branch) has been set up.
62+
63+
### Step 1: Bump versions for release
64+
65+
Once bugs have been triaged and the community feels ready, submit pull requests to bump the
66+
`VERSION` make variable. For a new release, there should be two pull requests:
67+
68+
1. One for the `main` branch to update the minor semantic version. Ex: Update `0.12.0-rc0` to
69+
`0.13.0-rc0`
70+
2. One for the `release-v*` branch, dropping any release candidate patch suffixes and/or updating
71+
the patch semantic version itself. Ex: `0.13.0` to `0.13.1`.
72+
73+
In both cases, run `make bundle` and commit any generated changes as part of the pull request.
74+
Work with the community to get these pull requests merged.
75+
76+
### Step 2: Publish the Release
77+
78+
Repeat the process in [Step 1](#step-1-create-a-release-candidate) and
79+
[Step 2](#step-2-publish-draft-release) above to create the release. For an official release, the
80+
version should adhere to the `X.Y.Z` format (not extra dashes).

0 commit comments

Comments
 (0)