2015-08-12 17:31:37 +02:00
Building a Compose release
==========================
2015-07-01 16:57:27 +02:00
2015-10-28 17:01:34 +01:00
## Prerequisites
The release scripts require the following tools installed on the host:
* https://hub.github.com/
* https://stedolan.github.io/jq/
* http://pandoc.org/
2015-08-12 17:31:37 +02:00
## To get started with a new release
2015-07-01 16:57:27 +02:00
2015-09-11 07:44:25 +02:00
Create a branch, update version, and add release notes by running `make-branch`
2015-07-01 16:57:27 +02:00
2015-09-11 08:02:01 +02:00
./script/release/make-branch $VERSION [$BASE_VERSION]
2015-07-01 16:57:27 +02:00
2015-09-22 16:10:11 +02:00
`$BASE_VERSION` will default to master. Use the last version tag for a bug fix
2015-09-11 07:44:25 +02:00
release.
2015-07-01 16:57:27 +02:00
2015-09-11 08:02:01 +02:00
As part of this script you'll be asked to:
2015-07-01 16:57:27 +02:00
2016-10-21 02:39:55 +02:00
1. Update the version in `compose/__init__.py` and `script/run/run.sh` .
2015-07-01 16:57:27 +02:00
2016-10-21 02:39:55 +02:00
If the next release will be an RC, append `-rcN` , e.g. `1.4.0-rc1` .
2015-07-01 16:57:27 +02:00
2017-09-01 21:14:56 +02:00
2. Write release notes in `CHANGELOG.md` .
2015-07-01 16:57:27 +02:00
2016-10-21 02:39:55 +02:00
Almost every feature enhancement should be mentioned, with the most
visible/exciting ones first. Use descriptive sentences and give context
where appropriate.
2015-08-25 15:26:33 +02:00
2016-10-21 02:39:55 +02:00
Bug fixes are worth mentioning if it's likely that they've affected lots
of people, or if they were regressions in the previous version.
2015-08-25 15:26:33 +02:00
Improvements to the code are not worth mentioning.
2016-10-21 02:39:55 +02:00
3. Create a new repository on [bintray ](https://bintray.com/docker-compose ).
The name has to match the name of the branch (e.g. `bump-1.9.0` ) and the
type should be "Generic". Other fields can be left blank.
4. Check that the `vnext-compose` branch on
[the docs repo ](https://github.com/docker/docker.github.io/ ) has
documentation for all the new additions in the upcoming release, and create
a PR there for what needs to be amended.
2015-08-12 17:31:37 +02:00
## When a PR is merged into master that we want in the release
2015-09-11 08:02:01 +02:00
1. Check out the bump branch and run the cherry pick script
2015-08-12 17:31:37 +02:00
git checkout bump-$VERSION
2015-09-11 08:02:01 +02:00
./script/release/cherry-pick-pr $PR_NUMBER
2015-08-12 17:31:37 +02:00
2015-09-11 08:02:01 +02:00
2. When you are done cherry-picking branches move the bump version commit to HEAD
2015-08-12 17:31:37 +02:00
2015-09-11 08:02:01 +02:00
./script/release/rebase-bump-commit
2015-08-12 17:31:37 +02:00
git push --force $USERNAME bump-$VERSION
2015-09-11 08:02:01 +02:00
2015-08-12 17:31:37 +02:00
## To release a version (whether RC or stable)
2015-10-28 17:01:34 +01:00
Check out the bump branch and run the `build-binaries` script
2015-08-12 17:31:37 +02:00
git checkout bump-$VERSION
2015-10-28 17:01:34 +01:00
./script/release/build-binaries
2015-08-12 17:31:37 +02:00
2015-10-02 17:25:16 +02:00
When prompted build the non-linux binaries and test them.
2015-08-12 17:31:37 +02:00
2017-09-01 21:14:56 +02:00
1. Download the different platform binaries by running the following script:
2015-08-12 17:31:37 +02:00
2017-09-01 21:14:56 +02:00
`./script/release/download-binaries $VERSION`
2015-10-02 17:25:16 +02:00
2017-09-01 21:14:56 +02:00
The binaries for Linux, OSX and Windows will be downloaded in the `binaries-$VERSION` folder.
2015-10-02 17:25:16 +02:00
2017-09-01 21:14:56 +02:00
3. Draft a release from the tag on GitHub (the `build-binaries` script will open the window for
2015-09-11 07:44:25 +02:00
you)
2015-08-12 17:31:37 +02:00
2016-10-21 02:39:55 +02:00
The tag will only be present on Github when you run the `push-release`
script in step 7, but you can pre-fill it at that point.
2015-08-25 15:26:33 +02:00
2016-10-21 02:39:55 +02:00
4. Paste in installation instructions and release notes. Here's an example -
change the Compose version and Docker version as appropriate:
2015-08-25 15:26:33 +02:00
2016-10-21 02:39:55 +02:00
If you're a Mac or Windows user, the best way to install Compose and keep it up-to-date is ** [Docker for Mac and Windows ](https://www.docker.com/products/docker )**.
2015-08-25 15:26:33 +02:00
2017-09-01 21:14:56 +02:00
Docker for Mac and Windows will automatically install the latest version of Docker Engine for you.
2015-08-25 15:26:33 +02:00
2016-10-21 02:39:55 +02:00
Alternatively, you can use the usual commands to install or upgrade Compose:
2015-08-25 15:26:33 +02:00
2016-10-21 02:39:55 +02:00
```
2017-10-23 22:21:16 +02:00
curl -L https://github.com/docker/compose/releases/download/1.16.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
2016-10-21 02:39:55 +02:00
chmod +x /usr/local/bin/docker-compose
```
2015-08-25 15:26:33 +02:00
2016-10-21 02:39:55 +02:00
See the [install docs ](https://docs.docker.com/compose/install/ ) for more install options and instructions.
2015-08-25 15:26:33 +02:00
2017-09-01 21:14:56 +02:00
## Compose file format compatibility matrix
| Compose file format | Docker Engine |
| --- | --- |
| 3.3 | 17.06.0+ |
| 3.0 – 3.2 | 1.13.0+ |
| 2.3| 17.06.0+ |
| 2.2 | 1.13.0+ |
| 2.1 | 1.12.0+ |
| 2.0 | 1.10.0+ |
| 1.0 | 1.9.1+ |
## Changes
2015-08-12 17:31:37 +02:00
2015-08-25 15:26:33 +02:00
...release notes go here...
2015-08-12 17:31:37 +02:00
2016-01-15 22:31:30 +01:00
5. Attach the binaries and `script/run/run.sh`
2015-08-12 17:31:37 +02:00
2015-10-14 21:14:04 +02:00
6. Add "Thanks" with a list of contributors. The contributor list can be generated
by running `./script/release/contributors` .
7. If everything looks good, it's time to push the release.
2015-09-22 16:10:11 +02:00
./script/release/push-release
2016-10-21 02:39:55 +02:00
8. Merge the bump PR.
2015-10-14 21:14:04 +02:00
8. Publish the release on GitHub.
2015-08-12 17:31:37 +02:00
2015-10-14 21:16:58 +02:00
9. Check that all the binaries download (following the install instructions) and run.
2015-08-12 17:31:37 +02:00
2017-09-01 21:14:56 +02:00
10. Announce the release on the appropriate Slack channel(s).
2015-08-12 17:31:37 +02:00
## If it’ s a stable release (not an RC)
2016-10-21 02:39:55 +02:00
1. Close the release’ s milestone.
2015-08-12 17:31:37 +02:00
## If it’ s a minor release (1.x.0), rather than a patch release (1.x.y)
1. Open a PR against `master` to:
- update `CHANGELOG.md` to bring it in line with `release`
- bump the version in `compose/__init__.py` to the *next* minor version number with `dev` appended. For example, if you just released `1.4.0` , update it to `1.5.0dev` .
2. Get the PR merged.
## Finally
1. Celebrate, however you’ d like.