Skip to content

Commit

Permalink
Update release procedures
Browse files Browse the repository at this point in the history
  • Loading branch information
tnozicka committed Mar 28, 2024
1 parent 74dbcae commit b0b0d72
Showing 1 changed file with 90 additions and 95 deletions.
185 changes: 90 additions & 95 deletions release.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
# Release procedure
# Release procedures

## Prerequisites
1. Stop merges to `master` branch except for the PR in the next section.
## Creating a release branch

## Creating a new release branch
1. Create a release branch on the upstream.
```
git fetch upstream master
git push upstream upstream/master:refs/heads/vX.Y
```
### Mark `master` as the next release
Moving `master` to the next release is done by creating a new `vX.Y+1.Z-alpha.0` tag for the next version. It can be either just the `git` tag or a proper `alpha` release, but given the very little difference the `beta` of the previous release, it's usability is limited to worth the effort.
```
git fetch git@github.com:scylladb/scylla-operator.git
git tag -s -a vX.Y+1.Z-alpha.0 "${revision}" -m "vX.Y+1.Z-alpha.0"
git push git@github.com:scylladb/scylla-operator.git vX.Y+1.Z-alpha.0
```

1. Set branch protection rules on `vX.Y` branch in GitHub repository settings.
### Creating a new release branch
```
git push git@github.com:scylladb/scylla-operator.git vX.Y+1.Z-alpha.0^{}:refs/heads/vX.Y
```

## Updating the release branch
1. On the release branch, change the default value of the image tag variable in Makefile. Set only major and minor part of version without the 'v' prefix.
### Updating the release branch
1. On the new release branch, change the default value of the image tag variable in Makefile. Set only major and minor part of version without the 'v' prefix.
```
IMAGE_TAG ?=X.Y
```
Expand All @@ -30,22 +33,14 @@

1. Commit changes and create a PR with `vX.Y` as base branch.
```
git commit -a -m "Updated generated code"
git commit -a -m "Updated generated"
```

1. Once the PR is merged, tag the merge commit as `vX.Y.Z-beta.0` using an **annotated** tag.
```
git fetch upstream vX.Y
git tag -a vX.Y.Z-beta.0 upstream/vX.Y -m "vX.Y.Z-beta.0"
git push upstream vX.Y.Z-beta.0
```

1. Ask QA to run smoke test on beta before preparing release candidate.

## Updating `master` branch for the next release
### Enable building docs for the new release branch
1. Enable building docs from `vX.Y` branch by adding an entry to `docs/source/conf.py`.
```
BRANCHES = ['master', 'v0.3', 'v1.0', 'v1.1', 'vX.Y']
BRANCHES = ['master', 'v1.11', 'v1.12', 'vX.Y']
```

1. Set new version as unstable:
Expand All @@ -55,78 +50,78 @@

1. Send the PR to `master` branch.

1. When merged, create an **annotated** tag `vX.Y+1.0-alpha.0` for the next release from the merge commit.
```
git fetch upstream master
git tag -a vX.Y+1.0-alpha.0 upstream/master -m 'vX.Y+1.0-alpha.0'
git push upstream vX.Y+1.0-alpha.0
```

1. Open `master` branch for merging.

## Publishing a release candidate
1. For `Z=0`, the release candidate should be tagged only when all issues in the GitHub milestone are closed and fixed in the release branch.

1. Tag the HEAD of the release branch using an **annotated** tag.
```
git fetch upstream vX.Y
git tag -a vX.Y.Z-rc.I upstream/vX.Y -m "vX.Y.Z-rc.I"
git push upstream vX.Y.Z-rc.I
```
CI will automatically create a new release in GitHub and publish the [release notes](#release-notes) there.

1. Announce the new RC with the link to the GitHub release on:
- `#scylla-operator` channel in ScyllaDB-Users Slack
- users mailing list (https://groups.google.com/g/scylladb-users)

## Publishing a final release

1. Tag the final release from the last RC that was approved by QA team using an **annotated** tag:
```
git tag -a vX.Y.Z tags/vX.Y.Z-rc.I^{} -m 'vX.Y.Z'
git push upstream vX.Y.Z
```
CI will automatically create a new release in GitHub and publish the [release notes](#release-notes) there.

1. Promote the container image from the latest RC approved by QA team.
- `skopeo`
```
skopeo copy docker://docker.io/scylladb/scylla-operator:X.Y.Z-rc.I docker://docker.io/scylladb/scylla-operator:X.Y.Z
```
- `docker`
```
docker pull docker.io/scylladb/scylla-operator:X.Y.Z-rc.I
docker tag docker.io/scylladb/scylla-operator:X.Y.Z-rc.I docker.io/scylladb/scylla-operator:X.Y.Z
docker push docker.io/scylladb/scylla-operator:X.Y.Z
```

1. Publish the Helm charts.
```
git checkout vX.Y.Z
gcloud auth login
make helm-publish HELM_CHANNEL=stable HELM_APP_VERSION=X.Y.Z HELM_CHART_VERSION=vX.Y.Z
```

1. Ask QA to smoke test vX.Y.Z helm charts.

1. Mark docs as latest, and remove from unstable versions list in `docs/source/conf.py` in the master branch:
```
smv_latest_version = 'vX.Y'
UNSTABLE_VERSIONS = ['master']
```

1. Submit a PR using `master` as target branch.

1. (optional) Update the release schedule in `docs/source/release.md`.

1. Submit a PR using `master` as target branch.

1. Wait for QA to give you the green light.

1. Announce the new release with the link to the GitHub release on:
- `#scylla-operator` channel in ScyllaDB-Users Slack
- users mailing list (https://groups.google.com/g/scylladb-users)
### Finalize
When the PRs are merged, publish `vX.Y.0-beta.0` pre-release and ask QA to run smoke test using it.

## Creating releases
All the releases and pre-releases are a promotion of an existing image built by our CI.

### Alpha
`alpha` is a testing release that is done on demand, usually from a `master` branch.

It is created as a promotion of an image created by a postsubmit from the associated branch.

### Beta
`beta` is a testing release that comes from a release branch.

It is created as a promotion of an image created by a postsubmit from the associated branch.

### RC
`rc` (release candidate) is the attempt at GA release.
It is intended to go through extended testing and become the GA image, if successful.

It is created as a promotion of an image created by a postsubmit from the associated branch.

### GA
GA release is our final release to be published.

It is created as a promotion of an `rc` image tagged earlier, if it passes the tests.

## Promoting releases and pre-releases

### Tagging the image
First, you need to promote an existing image with your new tag. We use both `docker.io` and `quay.io` for resiliency and different features like image scanning. (Image synchronization may get automated in the future.)

#### From `master` branch
```
skopeo copy --all docker://quay.io/scylladb/scylla-operator:latest-YYYY-MM-DD-HHMMSS docker://quay.io/scylladb/scylla-operator:X.Y.0-alpha.I
```
```
skopeo copy --all docker://quay.io/scylladb/scylla-operator:X.Y.0-alpha.I docker://docker.io/scylladb/scylla-operator:X.Y.0-alpha.I
```

#### From release branch
```
skopeo copy --all docker://quay.io/scylladb/scylla-operator:X.Y-YYYY-MM-DD-HHMMSS docker://quay.io/scylladb/scylla-operator:X.Y.Z-beta.I
```
```
skopeo copy --all docker://quay.io/scylladb/scylla-operator:X.Y.Z-beta.I docker://docker.io/scylladb/scylla-operator:X.Y.0-beta.I
```

#### From a pre-release
```
skopeo copy --all docker://quay.io/scylladb/scylla-operator:X.Y.0-rc.I docker://quay.io/scylladb/scylla-operator:X.Y.0
```
```
skopeo copy --all docker://quay.io/scylladb/scylla-operator:X.Y.0 docker://docker.io/scylladb/scylla-operator:X.Y.0
```

### Creating matching `git` tag
When the new image is tagged, you should create a matching `git` tag that this image was built from. (This may get automated in the future.)
```
revision="$( skopeo inspect '--format={{ index .Labels "org.opencontainers.image.revision" }}' docker://docker.io/scylladb/scylla-operator:X.Y.Z-alpha.I )"
```
```
git fetch git@github.com:scylladb/scylla-operator.git
git tag -s -a vX.Y.Z-alpha.I "${revision}" -m "vX.Y.Z-alpha.I"
git push git@github.com:scylladb/scylla-operator.git vX.Y.Z-alpha.I
```
CI will automatically create a new release in GitHub and publish the [release notes](#release-notes) there, and it will automatically publish Helm charts.

## Release announcements
A new release should be published on following channels. This is usually done only for RC and GA releases.
- `#scylla-operator` channel in ScyllaDB-Users Slack
- users mailing list (https://groups.google.com/g/scylladb-users)

## Release notes
1. Release notes are now published by CI for every release and beta+rc prereleases. The release notes contain changes since the last corresponding release in the same category, according to this table
Expand Down

0 comments on commit b0b0d72

Please sign in to comment.