2013-08-16 19:05:16 -04:00
|
|
|
## A maintainer's guide to releasing Docker
|
|
|
|
|
|
|
|
So you're in charge of a Docker release? Cool. Here's what to do.
|
|
|
|
|
|
|
|
If your experience deviates from this document, please document the changes
|
|
|
|
to keep it up-to-date.
|
|
|
|
|
|
|
|
### 1. Pull from master and create a release branch
|
|
|
|
|
|
|
|
```bash
|
2013-10-29 18:28:12 -04:00
|
|
|
export VERSION=vXXX
|
|
|
|
git checkout release
|
2013-08-16 19:05:16 -04:00
|
|
|
git pull
|
|
|
|
git checkout -b bump_$VERSION
|
2013-11-22 13:39:40 -05:00
|
|
|
git merge origin/master
|
2013-08-16 19:05:16 -04:00
|
|
|
```
|
|
|
|
|
|
|
|
### 2. Update CHANGELOG.md
|
|
|
|
|
|
|
|
You can run this command for reference:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
LAST_VERSION=$(git tag | grep -E "v[0-9\.]+$" | sort -nr | head -n 1)
|
|
|
|
git log $LAST_VERSION..HEAD
|
|
|
|
```
|
|
|
|
|
|
|
|
Each change should be formatted as ```BULLET CATEGORY: DESCRIPTION```
|
|
|
|
|
|
|
|
* BULLET is either ```-```, ```+``` or ```*```, to indicate a bugfix,
|
|
|
|
new feature or upgrade, respectively.
|
|
|
|
|
|
|
|
* CATEGORY should describe which part of the project is affected.
|
|
|
|
Valid categories are:
|
|
|
|
* Builder
|
|
|
|
* Documentation
|
|
|
|
* Hack
|
|
|
|
* Packaging
|
|
|
|
* Remote API
|
|
|
|
* Runtime
|
|
|
|
|
|
|
|
* DESCRIPTION: a concise description of the change that is relevant to the
|
|
|
|
end-user, using the present tense. Changes should be described in terms
|
|
|
|
of how they affect the user, for example "new feature X which allows Y",
|
|
|
|
"fixed bug which caused X", "increased performance of Y".
|
|
|
|
|
|
|
|
EXAMPLES:
|
|
|
|
|
|
|
|
```
|
|
|
|
+ Builder: 'docker build -t FOO' applies the tag FOO to the newly built
|
|
|
|
container.
|
|
|
|
* Runtime: improve detection of kernel version
|
|
|
|
- Remote API: fix a bug in the optional unix socket transport
|
|
|
|
```
|
|
|
|
|
|
|
|
### 3. Change the contents of the VERSION file
|
|
|
|
|
2013-11-22 13:39:40 -05:00
|
|
|
```bash
|
|
|
|
echo ${VERSION#v} > VERSION
|
|
|
|
```
|
|
|
|
|
2013-08-16 19:05:16 -04:00
|
|
|
### 4. Run all tests
|
|
|
|
|
2013-10-29 18:28:12 -04:00
|
|
|
```bash
|
2013-11-22 13:39:40 -05:00
|
|
|
docker run -privileged docker hack/make.sh test
|
2013-10-29 18:28:12 -04:00
|
|
|
```
|
2013-08-16 19:05:16 -04:00
|
|
|
|
2013-10-15 18:52:21 -04:00
|
|
|
### 5. Test the docs
|
|
|
|
|
|
|
|
Make sure that your tree includes documentation for any modified or
|
|
|
|
new features, syntax or semantic changes. Instructions for building
|
|
|
|
the docs are in ``docs/README.md``
|
|
|
|
|
|
|
|
### 6. Commit and create a pull request to the "release" branch
|
2013-08-16 19:05:16 -04:00
|
|
|
|
|
|
|
```bash
|
2013-10-29 18:28:12 -04:00
|
|
|
git add VERSION CHANGELOG.md
|
2013-08-16 19:05:16 -04:00
|
|
|
git commit -m "Bump version to $VERSION"
|
|
|
|
git push origin bump_$VERSION
|
|
|
|
```
|
|
|
|
|
2013-10-15 18:52:21 -04:00
|
|
|
### 7. Get 2 other maintainers to validate the pull request
|
2013-08-16 19:05:16 -04:00
|
|
|
|
2013-10-29 18:28:12 -04:00
|
|
|
### 8. Apply tag
|
2013-08-16 19:05:16 -04:00
|
|
|
|
|
|
|
```bash
|
2013-11-22 13:39:40 -05:00
|
|
|
git tag -a $VERSION -m $VERSION bump_$VERSION
|
|
|
|
git push origin $VERSION
|
2013-08-16 19:05:16 -04:00
|
|
|
```
|
|
|
|
|
2013-10-15 18:52:21 -04:00
|
|
|
Merging the pull request to the release branch will automatically
|
|
|
|
update the documentation on the "latest" revision of the docs. You
|
|
|
|
should see the updated docs 5-10 minutes after the merge. The docs
|
|
|
|
will appear on http://docs.docker.io/. For more information about
|
|
|
|
documentation releases, see ``docs/README.md``
|
|
|
|
|
2013-10-29 18:28:12 -04:00
|
|
|
### 9. Go to github to merge the bump_$VERSION into release
|
|
|
|
|
2013-11-22 13:39:40 -05:00
|
|
|
Don't forget to push that pretty blue button to delete the leftover
|
|
|
|
branch afterwards!
|
|
|
|
|
2013-10-29 18:28:12 -04:00
|
|
|
### 10. Publish binaries
|
2013-08-16 19:05:16 -04:00
|
|
|
|
|
|
|
To run this you will need access to the release credentials.
|
|
|
|
Get them from [the infrastructure maintainers](
|
|
|
|
https://github.com/dotcloud/docker/blob/master/hack/infrastructure/MAINTAINERS).
|
|
|
|
|
|
|
|
```bash
|
2013-10-29 18:28:12 -04:00
|
|
|
git checkout release
|
|
|
|
git fetch
|
|
|
|
git reset --hard origin/release
|
2013-09-18 20:41:08 -04:00
|
|
|
docker build -t docker .
|
2013-08-16 19:05:16 -04:00
|
|
|
docker run \
|
2013-10-29 18:28:12 -04:00
|
|
|
-e AWS_S3_BUCKET=test.docker.io \
|
|
|
|
-e AWS_ACCESS_KEY=$(cat ~/.aws/access_key) \
|
|
|
|
-e AWS_SECRET_KEY=$(cat ~/.aws/secret_key) \
|
|
|
|
-e GPG_PASSPHRASE=supersecretsesame \
|
2013-11-22 13:39:40 -05:00
|
|
|
-i -t -privileged \
|
2013-10-29 18:28:12 -04:00
|
|
|
docker \
|
|
|
|
hack/release.sh
|
2013-08-16 19:05:16 -04:00
|
|
|
```
|
|
|
|
|
2013-11-22 13:39:40 -05:00
|
|
|
It will run the test suite one more time, build the binaries and packages,
|
|
|
|
and upload to the specified bucket (you should use test.docker.io for
|
|
|
|
general testing, and once everything is fine, switch to get.docker.io).
|
2013-08-16 19:05:16 -04:00
|
|
|
|
2013-11-22 13:39:40 -05:00
|
|
|
### 11. Rejoice and Evangelize!
|
2013-08-16 19:05:16 -04:00
|
|
|
|
|
|
|
Congratulations! You're done.
|
2013-11-22 13:39:40 -05:00
|
|
|
|
|
|
|
Go forth and announce the glad tidings of the new release in `#docker`,
|
|
|
|
`#docker-dev`, on the [mailing list](https://groups.google.com/forum/#!forum/docker-dev),
|
|
|
|
and on Twitter!
|