Skip to content

Commit

Permalink
[doc] update prerelease process
Browse files Browse the repository at this point in the history
  • Loading branch information
minrk committed Oct 9, 2024
1 parent d712dec commit 4c738fb
Showing 1 changed file with 24 additions and 11 deletions.
35 changes: 24 additions & 11 deletions docs/source/dev-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,25 +87,38 @@ You'll might want to log in and create a token at http://localhost:8000/hub/toke
These are the current steps that it takes to cut a new release of `kbatch`.

### Release new version of `kbatch`/`kbatch-proxy`:
1. Update the version in the following files:
- [`kbatch/setup.cfg`](https://github.com/kbatch-dev/kbatch/blob/main/kbatch/setup.cfg#L7)
- [`kbatch/kbatch/__init__.py`](https://github.com/kbatch-dev/kbatch/blob/main/kbatch/kbatch/__init__.py#L17)
- [`kbatch-proxy/setup.cfg`](https://github.com/kbatch-dev/kbatch/blob/main/kbatch-proxy/setup.cfg#L7)
- [`docs/source/conf.py`](https://github.com/kbatch-dev/kbatch/blob/main/docs/source/conf.py#L25)
3. Update any relevant docs and merge these changes into the codebase.
2. [Draft a release on the `kbatch` GitHub repo.](https://github.com/kbatch-dev/kbatch/releases).

1. Update any relevant docs via pull request
2. tag a new (PEP440) version with `tbump`:
```
tbump NEW_VERSION # e.g. tbump 0.5.0a1
```
3. [Draft a release on the `kbatch` GitHub repo](https://github.com/kbatch-dev/kbatch/releases), referencing the tag just created.
- This triggers the [`publish-image.yaml`](https://github.com/kbatch-dev/kbatch/blob/main/.github/workflows/publish-image.yaml) workflow which:
- publishes a container image for `kbatch-proxy` to the [GitHub container registry](https://github.com/kbatch-dev/kbatch/pkgs/container/kbatch-proxy).
- publish `kbatch` and `kbatch-proxy` python libraries to PyPI.

#### Update appVersion in helm chart

Once the image is published, you can bump the version of kbatch-proxy in the helm chart to match.
This is stored in `appVersion` in [kbatch/Chart.yaml](https://github.com/kbatch-dev/helm-chart/blob/HEAD/kbatch/Chart.yaml)
and `kbatch_version` in [chartpress.yaml](https://github.com/kbatch-dev/helm-chart/blob/main/chartpress.yaml).
Updating appVersion _probably_ means a chart release is in order, but not necessarily.

### Release new version of `helm-chart`:
1. Once the container image and libraries have been successfully published, update the version of the `helm-chart` to match this new version of `kbatch`:
- [`kbatch/Chart.yaml`](https://github.com/kbatch-dev/helm-chart/blob/main/kbatch/Chart.yaml#L6)

The helm chart version and kbatch version are versioned separately,
though their versions may be the same or similar.
The latest version of the chart should probably reference the latest version of kbatch-proxy,
but chart releases can be made without needing updates to the Python packages if there are changes to the chart labels, options, etc.

1. make sure the `appVersion` is up to date in Chart.yaml and in sync with `kbatch_version` in chartpress.yaml.
2. Update any relevant docs and merge these changes into the codebase.
3. [Draft a release on the `helm-chart` GitHub repo.](https://github.com/kbatch-dev/helm-chart/releases)
3. [Draft a release on the `helm-chart` GitHub repo](https://github.com/kbatch-dev/helm-chart/releases), creating a new tag.
- This triggers the [`publish-chart.yaml`](https://github.com/kbatch-dev/helm-chart/blob/main/.github/workflows/publish-charts.yml) workflow which:
- publishes a Helm chart to the [GitHub Pages site](https://kbatch-dev.github.io/helm-chart/) for this repo.

> NOTE: there are known limitations to the pre-release process outlined [here](https://github.com/kbatch-dev/kbatch/issues/42).
Note about prereleases: helm has strict semver requirements, so prerelease tags on the helm chart should look like e.g. `0.5.0-alpha.1`,
while the Python packages use pep440 so the same version would be `0.5.0a1` for `kbatch` itself.
This is what would appear in the chart's `appVersion`.

0 comments on commit 4c738fb

Please sign in to comment.