github.com/goern/docker@v1.9.0-rc1/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. Publish release candidate binaries
   207  
   208  To run this you will need access to the release credentials. Get them from the
   209  Core maintainers.
   210  
   211  Replace "..." with the respective credentials:
   212  
   213  ```bash
   214  docker build -t docker .
   215  
   216  docker run \
   217         -e AWS_S3_BUCKET=test.docker.com \
   218         -e AWS_ACCESS_KEY="..." \
   219         -e AWS_SECRET_KEY="..." \
   220         -e GPG_PASSPHRASE="..." \
   221         -i -t --privileged \
   222         docker \
   223         hack/release.sh
   224  ```
   225  
   226  It will run the test suite, build the binaries and packages, and upload to the
   227  specified bucket, so this is a good time to verify that you're running against
   228  **test**.docker.com.
   229  
   230  After the binaries and packages are uploaded to test.docker.com, make sure
   231  they get tested in both Ubuntu and Debian for any obvious installation
   232  issues or runtime issues.
   233  
   234  If everything looks good, it's time to create a git tag for this candidate:
   235  
   236  ```bash
   237  git tag -a $RC_VERSION -m $RC_VERSION bump_$VERSION
   238  git push origin $RC_VERSION
   239  ```
   240  
   241  Announcing on multiple medias is the best way to get some help testing! An easy
   242  way to get some useful links for sharing:
   243  
   244  ```bash
   245  echo "Ubuntu/Debian: https://test.docker.com/ubuntu or curl -sSL https://test.docker.com/ | sh"
   246  echo "Linux 64bit binary: https://test.docker.com/builds/Linux/x86_64/docker-${VERSION#v}"
   247  echo "Darwin/OSX 64bit client binary: https://test.docker.com/builds/Darwin/x86_64/docker-${VERSION#v}"
   248  echo "Darwin/OSX 32bit client binary: https://test.docker.com/builds/Darwin/i386/docker-${VERSION#v}"
   249  echo "Linux 64bit tgz: https://test.docker.com/builds/Linux/x86_64/docker-${VERSION#v}.tgz"
   250  ```
   251  
   252  We recommend announcing the release candidate on:
   253  
   254  - IRC on #docker, #docker-dev, #docker-maintainers
   255  - In a comment on the pull request to notify subscribed people on GitHub
   256  - The [docker-dev](https://groups.google.com/forum/#!forum/docker-dev) group
   257  - The [docker-maintainers](https://groups.google.com/a/dockerproject.org/forum/#!forum/maintainers) group
   258  - Any social media that can bring some attention to the release candidate
   259  
   260  ### 8. Iterate on successive release candidates
   261  
   262  Spend several days along with the community explicitly investing time and
   263  resources to try and break Docker in every possible way, documenting any
   264  findings pertinent to the release.  This time should be spent testing and
   265  finding ways in which the release might have caused various features or upgrade
   266  environments to have issues, not coding.  During this time, the release is in
   267  code freeze, and any additional code changes will be pushed out to the next
   268  release.
   269  
   270  It should include various levels of breaking Docker, beyond just using Docker
   271  by the book.
   272  
   273  Any issues found may still remain issues for this release, but they should be
   274  documented and give appropriate warnings.
   275  
   276  During this phase, the `bump_$VERSION` branch will keep evolving as you will
   277  produce new release candidates. The frequency of new candidates is up to the
   278  release manager: use your best judgement taking into account the severity of
   279  reported issues, testers availability, and time to scheduled release date.
   280  
   281  Each time you'll want to produce a new release candidate, you will start by
   282  adding commits to the branch, usually by cherry-picking from master:
   283  
   284  ```bash
   285  git cherry-pick -x -m0 <commit_id>
   286  ```
   287  
   288  You want your "bump commit" (the one that updates the CHANGELOG and VERSION
   289  files) to remain on top, so you'll have to `git rebase -i` to bring it back up.
   290  
   291  Now that your bump commit is back on top, you will need to update the CHANGELOG
   292  file (if appropriate for this particular release candidate), and update the
   293  VERSION file to increment the RC number:
   294  
   295  ```bash
   296  export RC_VERSION=$VERSION-rcN
   297  echo $RC_VERSION > VERSION
   298  ```
   299  
   300  You can now amend your last commit and update the bump branch:
   301  
   302  ```bash
   303  git commit --amend
   304  git push -f $GITHUBUSER bump_$VERSION
   305  ```
   306  
   307  Repeat step 6 to tag the code, publish new binaries, announce availability, and
   308  get help testing.
   309  
   310  ### 9. Finalize the bump branch
   311  
   312  When you're happy with the quality of a release candidate, you can move on and
   313  create the real thing.
   314  
   315  You will first have to amend the "bump commit" to drop the release candidate
   316  suffix in the VERSION file:
   317  
   318  ```bash
   319  echo $VERSION > VERSION
   320  git add VERSION
   321  git commit --amend
   322  ```
   323  
   324  You will then repeat step 6 to publish the binaries to test
   325  
   326  ### 10. Get 2 other maintainers to validate the pull request
   327  
   328  ### 11. Publish final binaries
   329  
   330  Once they're tested and reasonably believed to be working, run against
   331  get.docker.com:
   332  
   333  ```bash
   334  docker run \
   335         -e AWS_S3_BUCKET=get.docker.com \
   336         -e AWS_ACCESS_KEY="..." \
   337         -e AWS_SECRET_KEY="..." \
   338         -e GPG_PASSPHRASE="..." \
   339         -i -t --privileged \
   340         docker \
   341         hack/release.sh
   342  ```
   343  
   344  ### 12. Apply tag and create release
   345  
   346  It's very important that we don't make the tag until after the official
   347  release is uploaded to get.docker.com!
   348  
   349  ```bash
   350  git tag -a $VERSION -m $VERSION bump_$VERSION
   351  git push origin $VERSION
   352  ```
   353  
   354  Once the tag is pushed, go to GitHub and create a [new release](https://github.com/docker/docker/releases/new).
   355  If the tag is for an RC make sure you check `This is a pre-release` at the bottom of the form.
   356  
   357  Select the tag that you just pushed as the version and paste the changelog in the description of the release.
   358  You can see examples in this two links:
   359  
   360  https://github.com/docker/docker/releases/tag/v1.8.0
   361  https://github.com/docker/docker/releases/tag/v1.8.0-rc3
   362  
   363  ### 13. Go to github to merge the `bump_$VERSION` branch into release
   364  
   365  Don't forget to push that pretty blue button to delete the leftover
   366  branch afterwards!
   367  
   368  ### 14. Update the docs branch
   369  
   370  You will need to point the docs branch to the newly created release tag:
   371  
   372  ```bash
   373  git checkout origin/docs
   374  git reset --hard origin/$VERSION
   375  git push -f origin docs
   376  ```
   377  
   378  The docs will appear on https://docs.docker.com/ (though there may be cached
   379  versions, so its worth checking http://docs.docker.com.s3-website-us-east-1.amazonaws.com/).
   380  For more information about documentation releases, see `docs/README.md`.
   381  
   382  Note that the new docs will not appear live on the site until the cache (a complex,
   383  distributed CDN system) is flushed. The `make docs-release` command will do this
   384  _if_ the `DISTRIBUTION_ID` is set correctly - this will take at least 15 minutes to run
   385  and you can check its progress with the CDN Cloudfront Chrome addon.
   386  
   387  ### 15. Create a new pull request to merge your bump commit back into master
   388  
   389  ```bash
   390  git checkout master
   391  git fetch
   392  git reset --hard origin/master
   393  git cherry-pick $VERSION
   394  git push $GITHUBUSER merge_release_$VERSION
   395  echo "https://github.com/$GITHUBUSER/docker/compare/docker:master...$GITHUBUSER:merge_release_$VERSION?expand=1"
   396  ```
   397  
   398  Again, get two maintainers to validate, then merge, then push that pretty
   399  blue button to delete your branch.
   400  
   401  ### 16. Update the VERSION files
   402  
   403  Now that version X.Y.Z is out, time to start working on the next! Update the
   404  content of the `VERSION` file to be the next minor (incrementing Y) and add the
   405  `-dev` suffix. For example, after 1.5.0 release, the `VERSION` file gets
   406  updated to `1.6.0-dev` (as in "1.6.0 in the making").
   407  
   408  ### 17. Rejoice and Evangelize!
   409  
   410  Congratulations! You're done.
   411  
   412  Go forth and announce the glad tidings of the new release in `#docker`,
   413  `#docker-dev`, on the [dev mailing list](https://groups.google.com/forum/#!forum/docker-dev),
   414  the [announce mailing list](https://groups.google.com/forum/#!forum/docker-announce),
   415  and on Twitter!