github.com/endocode/docker@v1.4.2-0.20160113120958-46eb4700391e/project/RELEASE-CHECKLIST.md (about)

     1  # Release Checklist
     2  ## A maintainer's guide to releasing Docker
     3  
     4  So you're in charge of a Docker release? Cool. Here's what to do.
     5  
     6  If your experience deviates from this document, please document the changes
     7  to keep it up-to-date.
     8  
     9  It is important to note that this document assumes that the git remote in your
    10  repository that corresponds to "https://github.com/docker/docker" is named
    11  "origin".  If yours is not (for example, if you've chosen to name it "upstream"
    12  or something similar instead), be sure to adjust the listed snippets for your
    13  local environment accordingly.  If you are not sure what your upstream remote is
    14  named, use a command like `git remote -v` to find out.
    15  
    16  If you don't have an upstream remote, you can add one easily using something
    17  like:
    18  
    19  ```bash
    20  export GITHUBUSER="YOUR_GITHUB_USER"
    21  git remote add origin https://github.com/docker/docker.git
    22  git remote add $GITHUBUSER git@github.com:$GITHUBUSER/docker.git
    23  ```
    24  
    25  ### 1. Pull from master and create a release branch
    26  
    27  All releases version numbers will be of the form: vX.Y.Z  where X is the major
    28  version number, Y is the minor version number and Z is the patch release version number.
    29  
    30  #### Major releases
    31  
    32  The release branch name is just vX.Y because it's going to be the basis for all .Z releases.
    33  
    34  ```bash
    35  export BASE=vX.Y
    36  export VERSION=vX.Y.Z
    37  git fetch origin
    38  git checkout --track origin/master
    39  git checkout -b release/$BASE
    40  ```
    41  
    42  This new branch is going to be the base for the release. We need to push it to origin so we
    43  can track the cherry-picked changes and the version bump:
    44  
    45  ```bash
    46  git push origin release/$BASE
    47  ```
    48  
    49  When you have the major release branch in origin, we need to create the bump fork branch
    50  that we'll push to our fork:
    51  
    52  ```bash
    53  git checkout -b bump_$VERSION
    54  ```
    55  
    56  #### Patch releases
    57  
    58  If we have the release branch in origin, we can create the forked bump branch from it directly:
    59  
    60  ```bash
    61  export VERSION=vX.Y.Z
    62  export PATCH=vX.Y.Z+1
    63  git fetch origin
    64  git checkout --track origin/release/$BASE
    65  git checkout -b bump_$PATCH
    66  ```
    67  
    68  We cherry-pick only the commits we want into the bump branch:
    69  
    70  ```bash
    71  # get the commits ids we want to cherry-pick
    72  git log
    73  # cherry-pick the commits starting from the oldest one, without including merge commits
    74  git cherry-pick <commit-id>
    75  git cherry-pick <commit-id>
    76  ...
    77  ```
    78  
    79  ### 2. Bump the API version on master
    80  
    81  We don't want to stop contributions to master just because we are releasing. At
    82  the same time, now that the release branch exists, we don't want API changes to
    83  go to the now frozen API version.
    84  
    85  Create a new entry in `docs/reference/api/` by copying the latest and
    86  bumping the version number (in both the file's name and content), and submit
    87  this in a PR against master.
    88  
    89  ### 3. Update CHANGELOG.md
    90  
    91  You can run this command for reference with git 2.0:
    92  
    93  ```bash
    94  git fetch --tags
    95  LAST_VERSION=$(git tag -l --sort=-version:refname "v*" | grep -E 'v[0-9\.]+$' | head -1)
    96  git log --stat $LAST_VERSION..bump_$VERSION
    97  ```
    98  
    99  If you don't have git 2.0 but have a sort command that supports `-V`:
   100  ```bash
   101  git fetch --tags
   102  LAST_VERSION=$(git tag -l | grep -E 'v[0-9\.]+$' | sort -rV | head -1)
   103  git log --stat $LAST_VERSION..bump_$VERSION
   104  ```
   105  
   106  If releasing a major version (X or Y increased in vX.Y.Z), simply listing notable user-facing features is sufficient.
   107  ```markdown
   108  #### Notable features since <last major version>
   109  * New docker command to do something useful
   110  * Remote API change (deprecating old version)
   111  * Performance improvements in some usecases
   112  * ...
   113  ```
   114  
   115  For minor releases (only Z increases in vX.Y.Z), provide a list of user-facing changes.
   116  Each change should be listed under a category heading formatted as `#### CATEGORY`.
   117  
   118  `CATEGORY` should describe which part of the project is affected.
   119    Valid categories are:
   120    * Builder
   121    * Documentation
   122    * Hack
   123    * Packaging
   124    * Remote API
   125    * Runtime
   126    * Other (please use this category sparingly)
   127  
   128  Each change should be formatted as `BULLET DESCRIPTION`, given:
   129  
   130  * BULLET: either `-`, `+` or `*`, to indicate a bugfix, new feature or
   131    upgrade, respectively.
   132  
   133  * DESCRIPTION: a concise description of the change that is relevant to the
   134    end-user, using the present tense. Changes should be described in terms
   135    of how they affect the user, for example "Add new feature X which allows Y",
   136    "Fix bug which caused X", "Increase performance of Y".
   137  
   138  EXAMPLES:
   139  
   140  ```markdown
   141  ## 0.3.6 (1995-12-25)
   142  
   143  #### Builder
   144  
   145  + 'docker build -t FOO .' applies the tag FOO to the newly built image
   146  
   147  #### Remote API
   148  
   149  - Fix a bug in the optional unix socket transport
   150  
   151  #### Runtime
   152  
   153  * Improve detection of kernel version
   154  ```
   155  
   156  If you need a list of contributors between the last major release and the
   157  current bump branch, use something like:
   158  ```bash
   159  git log --format='%aN <%aE>' v0.7.0...bump_v0.8.0 | sort -uf
   160  ```
   161  Obviously, you'll need to adjust version numbers as necessary.  If you just need
   162  a count, add a simple `| wc -l`.
   163  
   164  ### 4. Change the contents of the VERSION file
   165  
   166  Before the big thing, you'll want to make successive release candidates and get
   167  people to test. The release candidate number `N` should be part of the version:
   168  
   169  ```bash
   170  export RC_VERSION=${VERSION}-rcN
   171  echo ${RC_VERSION#v} > VERSION
   172  ```
   173  
   174  ### 5. Test the docs
   175  
   176  Make sure that your tree includes documentation for any modified or
   177  new features, syntax or semantic changes.
   178  
   179  To test locally:
   180  
   181  ```bash
   182  make docs
   183  ```
   184  
   185  To make a shared test at https://beta-docs.docker.io:
   186  
   187  (You will need the `awsconfig` file added to the `docs/` dir)
   188  
   189  ```bash
   190  make AWS_S3_BUCKET=beta-docs.docker.io BUILD_ROOT=yes docs-release
   191  ```
   192  
   193  ### 6. Commit and create a pull request to the "release" branch
   194  
   195  ```bash
   196  git add VERSION CHANGELOG.md
   197  git commit -m "Bump version to $VERSION"
   198  git push $GITHUBUSER bump_$VERSION
   199  echo "https://github.com/$GITHUBUSER/docker/compare/docker:release/$BASE...$GITHUBUSER:bump_$VERSION?expand=1"
   200  ```
   201  
   202  That last command will give you the proper link to visit to ensure that you
   203  open the PR against the "release" branch instead of accidentally against
   204  "master" (like so many brave souls before you already have).
   205  
   206  ### 7. Build release candidate rpms and debs
   207  
   208  ```bash
   209  docker build -t docker .
   210  docker run \
   211      --rm -t --privileged \
   212      -v $(pwd)/bundles:/go/src/github.com/docker/docker/bundles \
   213      docker \
   214      hack/make.sh binary build-deb build-rpm
   215  ```
   216  
   217  ### 8. Publish release candidate binaries
   218  
   219  To run this you will need access to the release credentials. Get them from the
   220  Core maintainers.
   221  
   222  Replace "..." with the respective credentials:
   223  
   224  ```bash
   225  docker build -t docker .
   226  
   227  docker run \
   228      -e AWS_S3_BUCKET=test.docker.com \ # static binaries are still pushed to s3
   229      -e AWS_ACCESS_KEY="..." \
   230      -e AWS_SECRET_KEY="..." \
   231      -i -t --privileged \
   232      docker \
   233      hack/release.sh
   234  ```
   235  
   236  It will run the test suite, build the binaries and upload to the specified bucket,
   237  so this is a good time to verify that you're running against **test**.docker.com.
   238  
   239  After the binaries are uploaded to test.docker.com and the packages are on
   240  apt.dockerproject.org and yum.dockerproject.org, make sure
   241  they get tested in both Ubuntu and Debian for any obvious installation
   242  issues or runtime issues.
   243  
   244  If everything looks good, it's time to create a git tag for this candidate:
   245  
   246  ```bash
   247  git tag -a $RC_VERSION -m $RC_VERSION bump_$VERSION
   248  git push origin $RC_VERSION
   249  ```
   250  
   251  Announcing on multiple medias is the best way to get some help testing! An easy
   252  way to get some useful links for sharing:
   253  
   254  ```bash
   255  echo "Ubuntu/Debian: curl -sSL https://test.docker.com/ | sh"
   256  echo "Linux 64bit binary: https://test.docker.com/builds/Linux/x86_64/docker-${VERSION#v}"
   257  echo "Darwin/OSX 64bit client binary: https://test.docker.com/builds/Darwin/x86_64/docker-${VERSION#v}"
   258  echo "Linux 64bit tgz: https://test.docker.com/builds/Linux/x86_64/docker-${VERSION#v}.tgz"
   259  echo "Windows 64bit client binary: https://test.docker.com/builds/Windows/x86_64/docker-${VERSION#v}.exe"
   260  echo "Windows 32bit client binary: https://test.docker.com/builds/Windows/i386/docker-${VERSION#v}.exe"
   261  ```
   262  
   263  We recommend announcing the release candidate on:
   264  
   265  - IRC on #docker, #docker-dev, #docker-maintainers
   266  - In a comment on the pull request to notify subscribed people on GitHub
   267  - The [docker-dev](https://groups.google.com/forum/#!forum/docker-dev) group
   268  - The [docker-maintainers](https://groups.google.com/a/dockerproject.org/forum/#!forum/maintainers) group
   269  - Any social media that can bring some attention to the release candidate
   270  
   271  ### 9. Iterate on successive release candidates
   272  
   273  Spend several days along with the community explicitly investing time and
   274  resources to try and break Docker in every possible way, documenting any
   275  findings pertinent to the release.  This time should be spent testing and
   276  finding ways in which the release might have caused various features or upgrade
   277  environments to have issues, not coding.  During this time, the release is in
   278  code freeze, and any additional code changes will be pushed out to the next
   279  release.
   280  
   281  It should include various levels of breaking Docker, beyond just using Docker
   282  by the book.
   283  
   284  Any issues found may still remain issues for this release, but they should be
   285  documented and give appropriate warnings.
   286  
   287  During this phase, the `bump_$VERSION` branch will keep evolving as you will
   288  produce new release candidates. The frequency of new candidates is up to the
   289  release manager: use your best judgement taking into account the severity of
   290  reported issues, testers availability, and time to scheduled release date.
   291  
   292  Each time you'll want to produce a new release candidate, you will start by
   293  adding commits to the branch, usually by cherry-picking from master:
   294  
   295  ```bash
   296  git cherry-pick -x -m0 <commit_id>
   297  ```
   298  
   299  You want your "bump commit" (the one that updates the CHANGELOG and VERSION
   300  files) to remain on top, so you'll have to `git rebase -i` to bring it back up.
   301  
   302  Now that your bump commit is back on top, you will need to update the CHANGELOG
   303  file (if appropriate for this particular release candidate), and update the
   304  VERSION file to increment the RC number:
   305  
   306  ```bash
   307  export RC_VERSION=$VERSION-rcN
   308  echo $RC_VERSION > VERSION
   309  ```
   310  
   311  You can now amend your last commit and update the bump branch:
   312  
   313  ```bash
   314  git commit --amend
   315  git push -f $GITHUBUSER bump_$VERSION
   316  ```
   317  
   318  Repeat step 6 to tag the code, publish new binaries, announce availability, and
   319  get help testing.
   320  
   321  ### 10. Finalize the bump branch
   322  
   323  When you're happy with the quality of a release candidate, you can move on and
   324  create the real thing.
   325  
   326  You will first have to amend the "bump commit" to drop the release candidate
   327  suffix in the VERSION file:
   328  
   329  ```bash
   330  echo $VERSION > VERSION
   331  git add VERSION
   332  git commit --amend
   333  ```
   334  
   335  You will then repeat step 6 to publish the binaries to test
   336  
   337  ### 11. Get 2 other maintainers to validate the pull request
   338  
   339  ### 12. Build final rpms and debs
   340  
   341  ```bash
   342  docker build -t docker .
   343  docker run \
   344      --rm -t --privileged \
   345      -v $(pwd)/bundles:/go/src/github.com/docker/docker/bundles \
   346      docker \
   347      hack/make.sh binary build-deb build-rpm
   348  ```
   349  
   350  ### 13. Publish final binaries
   351  
   352  Once they're tested and reasonably believed to be working, run against
   353  get.docker.com:
   354  
   355  ```bash
   356  docker build -t docker .
   357  docker run \
   358      -e AWS_S3_BUCKET=get.docker.com \ # static binaries are still pushed to s3
   359      -e AWS_ACCESS_KEY="..." \
   360      -e AWS_SECRET_KEY="..." \
   361      -i -t --privileged \
   362      docker \
   363      hack/release.sh
   364  ```
   365  
   366  ### 14. Apply tag and create release
   367  
   368  It's very important that we don't make the tag until after the official
   369  release is uploaded to get.docker.com!
   370  
   371  ```bash
   372  git tag -a $VERSION -m $VERSION bump_$VERSION
   373  git push origin $VERSION
   374  ```
   375  
   376  Once the tag is pushed, go to GitHub and create a [new release](https://github.com/docker/docker/releases/new).
   377  If the tag is for an RC make sure you check `This is a pre-release` at the bottom of the form.
   378  
   379  Select the tag that you just pushed as the version and paste the changelog in the description of the release.
   380  You can see examples in this two links:
   381  
   382  https://github.com/docker/docker/releases/tag/v1.8.0
   383  https://github.com/docker/docker/releases/tag/v1.8.0-rc3
   384  
   385  ### 15. Go to github to merge the `bump_$VERSION` branch into release
   386  
   387  Don't forget to push that pretty blue button to delete the leftover
   388  branch afterwards!
   389  
   390  ### 16. Update the docs branch
   391  
   392  You will need to point the docs branch to the newly created release tag:
   393  
   394  ```bash
   395  git checkout origin/docs
   396  git reset --hard origin/$VERSION
   397  git push -f origin docs
   398  ```
   399  
   400  The docs will appear on https://docs.docker.com/ (though there may be cached
   401  versions, so its worth checking http://docs.docker.com.s3-website-us-east-1.amazonaws.com/).
   402  For more information about documentation releases, see `docs/README.md`.
   403  
   404  Note that the new docs will not appear live on the site until the cache (a complex,
   405  distributed CDN system) is flushed. The `make docs-release` command will do this
   406  _if_ the `DISTRIBUTION_ID` is set correctly - this will take at least 15 minutes to run
   407  and you can check its progress with the CDN Cloudfront Chrome addon.
   408  
   409  ### 17. Create a new pull request to merge your bump commit back into master
   410  
   411  ```bash
   412  git checkout master
   413  git fetch
   414  git reset --hard origin/master
   415  git cherry-pick $VERSION
   416  git push $GITHUBUSER merge_release_$VERSION
   417  echo "https://github.com/$GITHUBUSER/docker/compare/docker:master...$GITHUBUSER:merge_release_$VERSION?expand=1"
   418  ```
   419  
   420  Again, get two maintainers to validate, then merge, then push that pretty
   421  blue button to delete your branch.
   422  
   423  ### 18. Update the VERSION files
   424  
   425  Now that version X.Y.Z is out, time to start working on the next! Update the
   426  content of the `VERSION` file to be the next minor (incrementing Y) and add the
   427  `-dev` suffix. For example, after 1.5.0 release, the `VERSION` file gets
   428  updated to `1.6.0-dev` (as in "1.6.0 in the making").
   429  
   430  ### 19. Rejoice and Evangelize!
   431  
   432  Congratulations! You're done.
   433  
   434  Go forth and announce the glad tidings of the new release in `#docker`,
   435  `#docker-dev`, on the [dev mailing list](https://groups.google.com/forum/#!forum/docker-dev),
   436  the [announce mailing list](https://groups.google.com/forum/#!forum/docker-announce),
   437  and on Twitter!