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