-
Notifications
You must be signed in to change notification settings - Fork 712
Release Process
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 Scope team member, starting with Peter, 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.
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.
E.g. under Mac OS:
eval "$(docker-machine env weave-1)"
Get the latest tools.
$ make deps
$ git checkout -b release-0.1
NB 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 relase-0.1.0
)
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.)
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 and push the CHANGELOG to the release branch.
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
)
- 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
$ git tag -a -m "Release v0.1.0" v0.1.0
$ git push --tags origin release-0.1
$ git tag -a -f -m "Release v0.1.0" latest_release v0.1.0
$ git push -f [email protected]:weaveworks/scope latest_release
This performs sanity checks and produces artifacts.
$ bin/release build
If you don't need sudo
(most likely under Mac OS), run:
$ SUDO= bin/release build
Create release draft on GitHub
$ env GITHUB_TOKEN=xxx bin/release draft
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!
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
This interacts with Docker. If you don't need sudo to run Docker commands, you should do
$ env GITHUB_TOKEN=xxx SUDO= bin/release publish
Merge the release branch to master.
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.
- Install wordepress:
go get -u github.com/weaveworks/wordepress/cmd/wordepress
- Obtain a Wordpress application password:
- Login to https://weave.works/wp-admin
- Navigate to Users -> Your Profile -> Application Passwords
- Enter 'wordepress' as the application name and choose 'Add New'
- Publish the documentation:
- Dry run:
wordepress publish --dry-run --url https://www.weave.works --user yourwordpressuser --password 'your wordpress application password' --product scope --tag latest --version 0.1.0 releases/v0.1.0/site
- If everything went well, pubslish without dry-run:
wordepress publish --url https://www.weave.works --user yourwordpressuser --password 'your wordpress application password' --product scope --tag latest --version 0.1.0 releases/v0.1.0/site
- Dry run:
You're done. Congratulations.