github.com/dougm/docker@v1.5.0/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  ```bash
   130  echo ${VERSION#v} > VERSION
   131  ```
   132  
   133  ### 4. Test the docs
   134  
   135  Make sure that your tree includes documentation for any modified or
   136  new features, syntax or semantic changes.
   137  
   138  To test locally:
   139  
   140  ```bash
   141  make docs
   142  ```
   143  
   144  To make a shared test at http://beta-docs.docker.io:
   145  
   146  (You will need the `awsconfig` file added to the `docs/` dir)
   147  
   148  ```bash
   149  make AWS_S3_BUCKET=beta-docs.docker.io BUILD_ROOT=yes docs-release
   150  ```
   151  
   152  ### 5. Commit and create a pull request to the "release" branch
   153  
   154  ```bash
   155  git add VERSION CHANGELOG.md
   156  git commit -m "Bump version to $VERSION"
   157  git push $GITHUBUSER bump_$VERSION
   158  echo "https://github.com/$GITHUBUSER/docker/compare/docker:release...$GITHUBUSER:bump_$VERSION?expand=1"
   159  ```
   160  
   161  That last command will give you the proper link to visit to ensure that you
   162  open the PR against the "release" branch instead of accidentally against
   163  "master" (like so many brave souls before you already have).
   164  
   165  ### 6. Get 2 other maintainers to validate the pull request
   166  
   167  ### 7. Publish binaries
   168  
   169  To run this you will need access to the release credentials. Get them from the Core maintainers.
   170  
   171  Replace "..." with the respective credentials:
   172  
   173  ```bash
   174  docker build -t docker .
   175  docker run \
   176         -e AWS_S3_BUCKET=test.docker.com \
   177         -e AWS_ACCESS_KEY="..." \
   178         -e AWS_SECRET_KEY="..." \
   179         -e GPG_PASSPHRASE="..." \
   180         -i -t --privileged \
   181         docker \
   182         hack/release.sh
   183  ```
   184  
   185  It will run the test suite, build the binaries and packages,
   186  and upload to the specified bucket (you should use test.docker.com for
   187  general testing, and once everything is fine, switch to get.docker.com as
   188  noted below).
   189  
   190  After the binaries and packages are uploaded to test.docker.com, make sure
   191  they get tested in both Ubuntu and Debian for any obvious installation
   192  issues or runtime issues.
   193  
   194  Announcing on IRC in both `#docker` and `#docker-dev` is a great way to get
   195  help testing!  An easy way to get some useful links for sharing:
   196  
   197  ```bash
   198  echo "Ubuntu/Debian: https://test.docker.com/ubuntu or curl -sSL https://test.docker.com/ | sh"
   199  echo "Linux 64bit binary: https://test.docker.com/builds/Linux/x86_64/docker-${VERSION#v}"
   200  echo "Darwin/OSX 64bit client binary: https://test.docker.com/builds/Darwin/x86_64/docker-${VERSION#v}"
   201  echo "Darwin/OSX 32bit client binary: https://test.docker.com/builds/Darwin/i386/docker-${VERSION#v}"
   202  echo "Linux 64bit tgz: https://test.docker.com/builds/Linux/x86_64/docker-${VERSION#v}.tgz"
   203  ```
   204  
   205  Once they're tested and reasonably believed to be working, run against
   206  get.docker.com:
   207  
   208  ```bash
   209  docker run \
   210         -e AWS_S3_BUCKET=get.docker.com \
   211         -e AWS_ACCESS_KEY="..." \
   212         -e AWS_SECRET_KEY="..." \
   213         -e GPG_PASSPHRASE="..." \
   214         -i -t --privileged \
   215         docker \
   216         hack/release.sh
   217  ```
   218  
   219  ### 8. Breakathon
   220  
   221  Spend several days along with the community explicitly investing time and
   222  resources to try and break Docker in every possible way, documenting any
   223  findings pertinent to the release.  This time should be spent testing and
   224  finding ways in which the release might have caused various features or upgrade
   225  environments to have issues, not coding.  During this time, the release is in
   226  code freeze, and any additional code changes will be pushed out to the next
   227  release.
   228  
   229  It should include various levels of breaking Docker, beyond just using Docker
   230  by the book.
   231  
   232  Any issues found may still remain issues for this release, but they should be
   233  documented and give appropriate warnings.
   234  
   235  ### 9. Apply tag
   236  
   237  It's very important that we don't make the tag until after the official
   238  release is uploaded to get.docker.com!
   239  
   240  ```bash
   241  git tag -a $VERSION -m $VERSION bump_$VERSION
   242  git push origin $VERSION
   243  ```
   244  
   245  ### 10. Go to github to merge the `bump_$VERSION` branch into release
   246  
   247  Don't forget to push that pretty blue button to delete the leftover
   248  branch afterwards!
   249  
   250  ### 11. Update the docs branch
   251  
   252  If this is a MAJOR.MINOR.0 release, you need to make an branch for the previous release's
   253  documentation:
   254  
   255  ```bash
   256  git checkout -b docs-$PREVIOUS_MAJOR_MINOR
   257  git fetch
   258  git reset --hard origin/docs
   259  git push -f origin docs-$PREVIOUS_MAJOR_MINOR
   260  ```
   261  
   262  You will need the `awsconfig` file added to the `docs/` directory to contain the
   263  s3 credentials for the bucket you are deploying to.
   264  
   265  ```bash
   266  git checkout -b docs release || git checkout docs
   267  git fetch
   268  git reset --hard origin/release
   269  git push -f origin docs
   270  make AWS_S3_BUCKET=docs.docker.com BUILD_ROOT=yes DISTRIBUTION_ID=C2K6......FL2F docs-release
   271  ```
   272  
   273  The docs will appear on http://docs.docker.com/ (though there may be cached
   274  versions, so its worth checking http://docs.docker.com.s3-website-us-east-1.amazonaws.com/).
   275  For more information about documentation releases, see `docs/README.md`.
   276  
   277  Note that the new docs will not appear live on the site until the cache (a complex,
   278  distributed CDN system) is flushed. The `make docs-release` command will do this
   279  _if_ the `DISTRIBUTION_ID` is set correctly - this will take at least 15 minutes to run
   280  and you can check its progress with the CDN Cloudfront Chrome addin.
   281  
   282  ### 12. Create a new pull request to merge release back into master
   283  
   284  ```bash
   285  git checkout master
   286  git fetch
   287  git reset --hard origin/master
   288  git checkout -b merge_release_$VERSION
   289  git merge origin/release
   290  echo ${VERSION#v}-dev > VERSION
   291  git add VERSION
   292  git commit -m "Change version to $(cat VERSION)"
   293  git push $GITHUBUSER merge_release_$VERSION
   294  echo "https://github.com/$GITHUBUSER/docker/compare/docker:master...$GITHUBUSER:merge_release_$VERSION?expand=1"
   295  ```
   296  
   297  Again, get two maintainers to validate, then merge, then push that pretty
   298  blue button to delete your branch.
   299  
   300  ### 13. Rejoice and Evangelize!
   301  
   302  Congratulations! You're done.
   303  
   304  Go forth and announce the glad tidings of the new release in `#docker`,
   305  `#docker-dev`, on the [dev mailing list](https://groups.google.com/forum/#!forum/docker-dev),
   306  the [announce mailing list](https://groups.google.com/forum/#!forum/docker-announce),
   307  and on Twitter!