Table of Contents
- Live-stream your release
- Set up your docker env
- Make deps
- Create a release branch
- Get a GitHub token
- Update the CHANGELOG, update docs and test
- Update docs
- Test the release
- Tag
- bin/release build
- bin/release draft
- Edit release description on GitHub
- Update latest_release tag
- bin/release publish
- Merge
- Add new release to checkpoint-api.weave.works
- Update Scope Helm chart
This runbook cobbled together from
- https://github.com/weaveworks/weave/wiki/Release-Process
- https://github.com/weaveworks/weave/blob/master/docs/release-process.md
- Blood, sweat, and tears
When you have a problem, please ask a Weaveworks team member for help. When you've figured it out, please edit the document to reflect the fix! Through our powers combined, we can make this process better.
Live-stream your release
If you have the energy, please consider live-streaming your release on the chat. It's really helpful for tracking problems and fixes. It can also serve as a helpful source of information for those who follow in your footsteps.
Set up your docker env
E.g. under Mac OS:
eval "$(docker-machine env weave-1)"
Make deps
Get the latest tools.
$ make deps
Create a release branch
We use semantic versioning policy - https://semver.org/#summary
$ git checkout -b release-0.1
Note: Don't include patch versions in the branch name - successive patch versions for a given minor will be released of the same branch (i.e. name your branch release-0.1 and not release-0.1.0)
Get a GitHub token
If you don't have one already, go to https://github.com/settings/tokens/new and make one with a funny name, and the public_repo scope only. (I think.)
Update the CHANGELOG, update docs and test
See https://github.com/weaveworks/scope/compare/latest_release...master for a diff.
A starting point for the CHANGELOG entry for this release can be obtained by running a little CLI-fu. (Make sure to have jq installed for JSON processing.):
# set github token
export GITHUB_TOKEN=xxx
# update latest_release tag in local clone
git fetch -t origin
# get merged PR titles
git log --oneline latest_release...HEAD | \
sed -n -e 's%^.*Merge pull request #\([[:digit:]]*\) .*$%\1%p' -e 's%^.*(#\([[:digit:]]*\))$%\1%p' | \
xargs -I '{}' -- curl -s https://api.github.com/repos/weaveworks/scope/issues/{}?access_token=$GITHUB_TOKEN | \
jq -r '(.number | tostring) as $number | "- " + .title + "\n" + "\t[#" + $number + "](https://github.com/weaveworks/scope/pull/" + $number + ")"'
Then sort the lines by feature, bug fix, performance etc. sections. You may find it helpful to look at the original issues of the PRs to see what they are about. Commit the CHANGELOG to the release branch.
Update docs
Update all version references in the documentation (i.e. under the site/ directory) to the version being released (e.g. all image versions in the installation docs such as weaveworks/scope:0.15 )
For instance, when releasing version 1.2.0:
find . -type f -exec sed -ri 's%weaveworks/scope:[0-9]+(\.[0-9]+)*%weaveworks/scope:1.2.0%g' {} \;
Test the release
- Create a PR for the release branch, merging into
master - For the description of the PR, supply a GFM checklist of things that need to be tested:
- if it's a major release, use the Release Qualification checklist
- if it's a patch release, make a list of things to be tested
Also, load the release branch on your test machines, and click around. If you discover any issues, or find yourself looking for anything in particular, update the Release Qualification checklist so we can get it deliberately next time.
Proceed from here only when:
- Every item on the checklist has been tested and confirmed to work
- The changelog has been reviewed and you have an LGTM
Tag
$ TAG=v0.1.0
$ git tag -a -m "Release $TAG" $TAG
$ git push --tags origin release-0.1
bin/release build
This performs sanity checks and produces artifacts.
$ bin/release build
bin/release draft
Create release draft on GitHub
$ env GITHUB_TOKEN=xxx bin/release draft
Edit release description on GitHub
Go to https://github.com/weaveworks/scope/releases and edit the most recent release description so it matches the previous releases, editing the links as appropriate. Click Save draft, not Publish!
Update latest_release tag
$ git tag -a -f -m "Release $TAG" latest_release $TAG
$ git push -f origin latest_release
bin/release publish
Log in to Docker Hub with your account:
$ docker login
Username: <your username>
Password:
Email: <your email>
Then push the release:
$ env GITHUB_TOKEN=xxx bin/release publish
Merge
Merge the release PR to master.
Add new release to checkpoint-api.weave.works
Go to https://checkpoint-api.weave.works/admin and fill in the details of the release for both for the scope-app and scope-probe products so that users can be automatically informed of a new version being available.
Update Scope Helm chart
Once we are fairly confident the new release is working fine, update the stable/weave-scope Helm chart - e.g. see #13949 for the reference.
