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