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