Skip to content

Commit

Permalink
docs: update release doc
Browse files Browse the repository at this point in the history
Closes #3284
  • Loading branch information
dougm committed Feb 9, 2024
1 parent 69785ff commit 2d1b52f
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 136 deletions.
3 changes: 3 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ Balu Dontu <bdontu@vmware.com> BaluDontu <bdontu@vmware.com>
Bruce Downs <bruceadowns@gmail.com> <bdowns@vmware.com>
Bruce Downs <bruceadowns@gmail.com> <bruce.downs@autodesk.com>
Bruce Downs <bruceadowns@gmail.com> <bruce.downs@jivesoftware.com>
Bryan Venteicher <bryanventeicher@gmail.com> <bryanv@users.noreply.github.com>
Brian Rak <brak@vmware.com> <brakthehack@users.noreply.github.com>
Clint Greenwood <cgreenwood@vmware.com> <clint.greenwood@gmail.com>
Cédric Blomart <cblomart@gmail.com> <cedric.blomart@minfin.fed.be>
Cédric Blomart <cblomart@gmail.com> cedric <cblomart@gmail.com>
Expand All @@ -25,6 +27,7 @@ Fabio Rapposelli <fabio@vmware.com> <fabio@rapposelli.org>
Faiyaz Ahmed <faiyaza@vmware.com> Faiyaz Ahmed <ahmedf@vmware.com>
Faiyaz Ahmed <faiyaza@vmware.com> Faiyaz Ahmed <faiyaza@gmail.com>
Faiyaz Ahmed <faiyaza@vmware.com> Faiyaz Ahmed <fdawg4l@users.noreply.github.com>
Hakan Halil <hhalil@vmware.com> <25109775+HakanSunay@users.noreply.github.com>
Henrik Hodne <henrik@travis-ci.com> <henrik@hodne.io>
Ian Eyberg <ian@deferpanic.com> <ian@opuler.com>
Jeremy Canady <jcanady@jackhenry.com> <jcanady@gmail.com>
Expand Down
6 changes: 6 additions & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ Brian McClain <brianmmcclain@gmail.com>
Brian Rak <brak@vmware.com>
brian57860 <brian57860@users.noreply.github.com>
Bruce Downs <bruceadowns@gmail.com>
Bruno Meneguello <1322552+bkmeneguello@users.noreply.github.com>
Bryan Venteicher <bryanventeicher@gmail.com>
C S P Nanda <cspn@google.com>
Carsten Grohmann <mail@carstengrohmann.de>
Cheng Cheng <chengch@vmware.com>
Chethan Venkatesh <chethanv@vmware.com>
Expand Down Expand Up @@ -80,6 +82,7 @@ Defa <zhoudefa666@163.com>
demarey <christophe.demarey@inria.fr>
Deric Crago <deric.crago@gmail.com>
Deyan Popov <deyan.popov@gmail.com>
Dinesh Bhat <35480850+dbhat-arkin@users.noreply.github.com>
ditsuke <ditsuke@protonmail.com>
Divyen Patel <divyenp@vmware.com>
Dnyanesh Gate <dnyanesh.gate@druva.com>
Expand All @@ -97,6 +100,7 @@ Essodjolo KAHANAM <essodjolo@kahanam.com>
Ethan Kaley <ethan.kaley@emc.com>
Evan Chu <echu@vmware.com>
Fabio Rapposelli <fabio@vmware.com>
fabriziopandini <fpandini@vmware.com>
Faiyaz Ahmed <faiyaza@vmware.com>
Federico Pellegatta <12744504+federico-pellegatta@users.noreply.github.com>
forkbomber <forkbomber@users.noreply.github.com>
Expand Down Expand Up @@ -198,6 +202,7 @@ rconde01 <rconde01@hotmail.com>
rHermes <teodor_spaeren@riseup.net>
Rianto Wahyudi <rwahyudi@gmail.com>
Ricardo Katz <rkatz@vmware.com>
rmcqueen <rmcqueen@vmware.com>
Robin Watkins <robwatkins@gmail.com>
Rowan Jacobs <rojacobs@pivotal.io>
Roy Ling <royling0024@gmail.com>
Expand Down Expand Up @@ -246,6 +251,7 @@ Uwe Bessle <Uwe.Bessle@iteratec.de>
Vadim Egorov <vegorov@vmware.com>
Vamshik Shetty <svamshik@vmware.com>
Vikram Krishnamurthy <vikramkrishnamu@vmware.com>
Vipul Kotkar <vkotkar@vmware.com>
volanja <volaaanja@gmail.com>
Volodymyr Bobyr <pupsua@gmail.com>
Waldek Maleska <w.maleska@gmail.com>
Expand Down
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,6 @@ The code in the `govmomi` package is a wrapper for the code that is generated fr

## Installation

### govmomi (Package)

```bash
go get -u github.com/vmware/govmomi
```

### Binaries and Docker Images for `govc` and `vcsim`

Installation instructions, released binaries, and Docker images are documented in the respective README files of [`govc`][govc] and [`vcsim`][vcsim].
Expand Down
144 changes: 14 additions & 130 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# How to create a `govmomi` Release on Github

> **Note**
> **Note**
>
> The steps outlined in this document can only be performed by maintainers or
> administrators of this project.
Expand All @@ -18,24 +18,7 @@ uses [`goreleaser`](http://goreleaser.com/) and automatically creates/pushes:
- Docker images for `vmware/govc` and `vmware/vcsim` to Docker Hub
- Source code

Starting with release tag `v0.29.0`, releases are not tagged on the `main`
branch anymore but a dedicated release branch, for example `release-0.29`. This
process has already been followed for patch releases and back-ports.

> **Warning**
>
> If you create a release after the `v0.29.0` tag, start
> [here](#creating-a-release-after-v0290). To create a release with an older
> tag, e.g. cherrypick or back-port, continue
> [here](#creating-a-release-before-v0290).
## Creating a release after Version `v0.29.0`

The release process from `v0.29.0` has been further simplified and is done
through the Github UI. The only pre-requirement is creating a release branch,
which can be done through the Github UI or `git` CLI.

This guide describes the CLI process.
Releases are not tagged on the `main` branch, but a dedicated release branch, for example `release-0.35`.

### Verify `main` branch is up to date with the remote

Expand All @@ -48,7 +31,7 @@ git diff main origin/main
git pull origin/main
```

> **Warning**
> **Warning**
>
> These steps assume `origin` to point to the remote
> `https://github.com/vmware/govmomi`, respectively
Expand All @@ -57,30 +40,29 @@ git pull origin/main
### Create a release branch

For new releases, create a release branch from the most recent commit in
`main`, e.g. `release-0.30`.
`main`, e.g. `release-0.35`.

```console
export RELEASE_BRANCH=release-0.30
export RELEASE_BRANCH=release-0.35
git checkout -b ${RELEASE_BRANCH}
```

For maintenance/patch releases on **existing** release branches **after** tag
`v0.29.0` simply checkout the existing release branch and add commits to the
existing release branch.
For maintenance/patch releases on **existing** release branches, simply checkout the existing
release branch and add commits to the existing release branch.

### Verify `make docs` and `CONTRIBUTORS` are up to date

> **Warning**
>
>
> Run the following commands and commit any changes to the release branch before
> proceeding with the release.
```console
make doc
./scripts/contributors.sh
if [ -z "$(git status --porcelain)" ]; then
if [ -z "$(git status --porcelain)" ]; then
echo "working directory clean: proceed with release"
else
else
echo "working directory dirty: please commit changes"
fi

Expand All @@ -93,7 +75,7 @@ fi
>
> Do not create a tag as this will be done by the release automation.
The final step is pushing the new/updated release branch.
The final step is pushing the new/updated release branch.

```console
git push origin ${RELEASE_BRANCH}
Expand All @@ -106,10 +88,10 @@ navigate to `Actions -> Workflows -> Release`.

Click `Run Workflow` which opens a dropdown list.

Select the new/updated branch, e.g. `release-0.30`, i.e. **not** the `main`
Select the new/updated branch, e.g. `release-0.35`, i.e. **not** the `main`
branch.

Specify a semantic `tag` to associate with the release, e.g. `v0.30.0`.
Specify a semantic `tag` to associate with the release, e.g. `v0.35.0`.

> **Warning**
>
Expand All @@ -124,102 +106,4 @@ Click `Run Workflow` to kick off the workflow.

After successful completion and if the newly created `tag` is the **latest**
(semantic version sorted) tag in the repository, a PR is automatically opened
against the `main` branch to update the `CHANGELOG`. Please review and merge
accordingly.

## Creating a release before Version `v0.29.0`

The release process before `v0.29.0` differs since it's based on manually
creating and pushing tags. Here, on every new tag matching `v*` pushed to the
repository a Github Action Release Workflow is executed.

### Verify `main` branch is up to date with the remote

```console
git checkout main
git fetch -avp
git diff main origin/main

# if your local and remote branches diverge run
git pull origin/main
```

> **Warning**
>
> These steps assume `origin` to point to the remote
> `https://github.com/vmware/govmomi`, respectively
> `git@github.com:vmware/govmomi`.
### Create a release branch

Pick a reference (commit, branch or tag) **before** the `v0.29.0` tag and create
a release branch from there.

The following example creates a cherrypick release (`v0.28.1`) based on the
`v0.28.0` tag.

```console
export RELEASE_BRANCH=release-0.28
git checkout -b ${RELEASE_BRANCH} v0.28.0
```

Optionally, incorporate (cherry-pick) commits into the branch.

> **Warning**
>
> Make sure that these commits/ranges do not contain commits after the `v0.29.0`
> tag which include release automation changes, i.e. files in `.github/workflows/`!
### Verify `make docs` and `CONTRIBUTORS` are up to date

> **Warning**
>
> Run the following commands and commit any changes to the release branch before
> proceeding with the release.
```console
make doc
./scripts/contributors.sh
if [ -z "$(git status --porcelain)" ]; then
echo "working directory clean: proceed with release"
else
echo "working directory dirty: please commit changes"
fi

# perform git add && git commit ... in case there were changes
```

### Set `RELEASE_VERSION` variable

This variable is used and referenced in the subsequent commands. Set it to the
**upcoming** release version, adhering to the [semantic
versioning](https://semver.org/) scheme:

```console
export RELEASE_VERSION=v0.28.1
```

### Create the Git Tag

```console
git tag -a ${RELEASE_VERSION} -m "Release ${RELEASE_VERSION}"
```

### Push the new Tag

```console
# Will trigger Github Actions Release Workflow
git push --atomic origin ${RELEASE_BRANCH} refs/tags/${RELEASE_VERSION}
```

### Verify Github Action Release Workflow

After pushing a new release tag, the status of the workflow can be inspected
[here](https://github.com/vmware/govmomi/actions/workflows/govmomi-release.yaml).

![Release](static/release-workflow.png "Successful Release Run")

After a successful release, a pull request is automatically created by the
Github Actions bot to update the [CHANGELOG](CHANGELOG.md). This `CHANGELOG.md`
is also generated with `git-chglog` but uses a slightly different template
(`.chglog/CHANGELOG.tpl.md`) for rendering (issue/PR refs are excluded).
against the `main` branch to update the `CHANGELOG`.

0 comments on commit 2d1b52f

Please sign in to comment.