-
Notifications
You must be signed in to change notification settings - Fork 679
TestingReleaseProcess
The release process (as embodied in the script ./bin/release
can be tested without polluting the official {Git,Docker}Hub repositories.
You will of course need your own GitHub repo and DockerHub account. Then,
- Branch from master (or whatever you want to test releasing). This is so you can throw the branch away when you're done (or keep it around. You only need it locally).
git checkout -b test_releases
- Change GITHUB_USER and DOCKERHUB_USER in the script to your accounts (I commit this change, so I can just rebase my
test_releases
branch to get a usable state), or export them. You'll need to have a GitHub application token in the environment too (as the script tells you), and be authenticated with DockerHub as the given account.
Now you are ready to prepare a release. Pick a version, preferably with the suffix -test
to distinguish it from proper releases, just in case.
This bit is what you would normally do for a release:
-
Make a changelog entry for your chosen version and commit that.
-
Tag HEAD with the "release tag"
git tag -a v0.8.1-test
-
Use
./bin/release build
to make the release artefacts. Up to this point it doesn't matter if you've not changed GITHUB_USER or DOCKERHUB_USER, since everything is local. -
Change into the release directory and tag HEAD with
latest_release
cd releases/v0.8.1-rest; git tag -af latest_release
-
Push the tags and associated commit to GitHub (remember to push to your own GitHub account)
git push -f [email protected]:$GITHUB_USER/weave v0.8.2-test latest_release
-
Go back to your working dir and publish the release
cd - ; ./bin/release publish
These things have been created or changed:
- a release tag in your local and origin repos
- the "latest_release" tag (has been moved)
- a GitHub release in your GitHub account
- DockerHub images
Of these, you really only need to care about the GitHub release, and only if you want to test with the same tag again. The easiest thing to do to clean up is just to go to `https://github.com/$GITHUB_USER/weave/releases", follow the link to the test release, and delete it.
Tags you can delete in much the same place (tags tab), and locally with git tag -d $tag
. DockerHub images can be deleted through the DockerHub site, if you care enough.