github.com/latiif/helm@v2.15.0+incompatible/docs/release_checklist.md (about)

     1  # Release Checklist
     2  
     3  **IMPORTANT**: If your experience deviates from this document, please document the changes to keep it up-to-date.
     4  
     5  ## Release Meetings
     6  
     7  As part of the release process, two of the weekly developer calls will be co-opted as "release meetings."
     8  
     9  ### Start of the Release Cycle
    10  
    11  The first developer call after a release will be used as the release meeting to start the next release cycle.
    12  During this meeting, the following items must be identified:
    13  
    14  - Release date
    15  - Goals/Objectives for this release
    16  - The release manager (basically whoever is going to cut the release)
    17  - Any other important details for the community
    18  
    19  All of this information should be added to the GitHub milestone for the given release. This should give the
    20  community and maintainers a clear set of guidelines to follow when choosing whether or not to add issues and PRs to a
    21  given release.
    22  
    23  ### End (almost) of the Release Cycle
    24  
    25  The developer call closest to two weeks before the scheduled release date will be used to review any remaining PRs that
    26  should be pulled into the release. This is the place to debate whether or not we should wait before cutting a release
    27  and any other concerns. At the end of this meeting, if the release date has not been pushed out, the first RC should be
    28  cut. Subsequent developer calls in between this meeting and the release date should have some time set aside to see if
    29  any bugs were found. Once the release date is reached, the final release can be cut.
    30  
    31  ## A Maintainer's Guide to Releasing Helm
    32  
    33  So you're in charge of a new release for Helm? Cool. Here's what to do...
    34  
    35  ![TODO: Nothing](images/nothing.png)
    36  
    37  Just kidding! :trollface:
    38  
    39  All releases will be of the form vX.Y.Z where X is the major version number, Y is the minor version number and Z is the
    40  patch release number. This project strictly follows [semantic versioning](http://semver.org/) so following this step is
    41  critical.
    42  
    43  It is important to note that this document assumes that the git remote in your repository that corresponds to
    44  "https://github.com/helm/helm" is named "upstream". If yours is not (for example, if you've chosen to name it "origin"
    45  or something similar instead), be sure to adjust the listed snippets for your local environment accordingly. If you are
    46  not sure what your upstream remote is named, use a command like `git remote -v` to find out.
    47  
    48  If you don't have an upstream remote, you can add one easily using something like:
    49  
    50  ```shell
    51  git remote add upstream git@github.com:helm/helm.git
    52  ```
    53  
    54  In this doc, we are going to reference a few environment variables as well, which you may want to set for convenience.
    55  
    56  For major/minor releases, use the following:
    57  
    58  ```shell
    59  export RELEASE_NAME=vX.Y.0
    60  export RELEASE_BRANCH_NAME="release-X.Y"
    61  export RELEASE_CANDIDATE_NAME="$RELEASE_NAME-rc.1"
    62  ```
    63  
    64  If you are creating a patch release, you may want to use the following instead:
    65  
    66  ```shell
    67  export PREVIOUS_PATCH_RELEASE=vX.Y.Z
    68  export RELEASE_NAME=vX.Y.Z+1
    69  export RELEASE_BRANCH_NAME="release-X.Y"
    70  export RELEASE_CANDIDATE_NAME="$RELEASE_NAME-rc.1"
    71  ```
    72  
    73  We are also going to be adding security and verification of the release process by
    74  hashing the binaries and providing signature files. We perform this using
    75  [GitHub and GPG](https://help.github.com/en/articles/about-commit-signature-verification).
    76  If you do not have GPG already setup you can follow these steps:
    77  1. [Install GPG](https://gnupg.org/index.html)
    78  2. [Generate GPG key](https://help.github.com/en/articles/generating-a-new-gpg-key)
    79  3. [Add key to GitHub account](https://help.github.com/en/articles/adding-a-new-gpg-key-to-your-github-account)
    80  4. [Set signing key in Git](https://help.github.com/en/articles/telling-git-about-your-signing-key)
    81  
    82  Once you have a signing key you need to add it to the KEYS file at the root of
    83  the repository. The instructions for adding it to the KEYS file are in the file.
    84  If you have not done so already, you need to add your public key to the keyserver
    85  network. If you use GnuPG you can follow the [instructions provided by Debian](https://debian-administration.org/article/451/Submitting_your_GPG_key_to_a_keyserver).
    86  
    87  ## 1. Create the Release Branch
    88  
    89  ### Major/Minor Releases
    90  
    91  Major releases are for new feature additions and behavioral changes *that break backwards compatibility*. Minor releases
    92  are for new feature additions that do not break backwards compatibility. To create a major or minor release, start by
    93  creating a `release-vX.Y.0` branch from master.
    94  
    95  ```shell
    96  git fetch upstream
    97  git checkout upstream/master
    98  git checkout -b $RELEASE_BRANCH_NAME
    99  ```
   100  
   101  This new branch is going to be the base for the release, which we are going to iterate upon later.
   102  
   103  ### Patch releases
   104  
   105  Patch releases are a few critical cherry-picked fixes to existing releases. Start by creating a `release-vX.Y.Z` branch
   106  
   107  ```shell
   108  git checkout -b $RELEASE_BRANCH_NAME upstream/$RELEASE_BRANCH_NAME
   109  ```
   110  
   111  From here, we can cherry-pick the commits we want to bring into the patch release:
   112  
   113  ```shell
   114  # get the commits ids we want to cherry-pick
   115  git log --oneline
   116  # cherry-pick the commits starting from the oldest one, without including merge commits
   117  git cherry-pick -x <commit-id>
   118  ```
   119  
   120  Finally, we create the tag for the patch on the branch and push upstream:
   121  
   122  ```shell
   123  git tag --sign --annotate "$RELEASE_NAME" --message "Helm release $RELEASE_NAME"
   124  git push upstream "$RELEASE_NAME"
   125  ```
   126  
   127  This new tag is going to be the base for the release, which we are going to iterate upon later.
   128  
   129  ## 2. Major/Minor releases: Change the Version Number in Git
   130  
   131  When doing a minor release, make sure to update pkg/version/version.go with the new release version.
   132  
   133  ```shell
   134  $ git diff pkg/version/version.go
   135  diff --git a/pkg/version/version.go b/pkg/version/version.go
   136  index 2109a0a..6f5a1a4 100644
   137  --- a/pkg/version/version.go
   138  +++ b/pkg/version/version.go
   139  @@ -26,7 +26,7 @@ var (
   140          // Increment major number for new feature additions and behavioral changes.
   141          // Increment minor number for bug fixes and performance enhancements.
   142          // Increment patch number for critical fixes to existing releases.
   143  -       Version = "v2.6"
   144  +       Version = "v2.7"
   145  
   146          // BuildMetadata is extra build time data
   147          BuildMetadata = "unreleased"
   148  ```
   149  
   150  ```shell
   151  git add .
   152  git commit -m "bump version to $RELEASE_CANDIDATE_NAME"
   153  ```
   154  
   155  This will update it for the $RELEASE_BRANCH_NAME only. You will also need to pull
   156  this change into the master branch for when the next release is being created.
   157  
   158  ```shell
   159  # get the last commit id i.e. commit to bump the version
   160  git log --format="%H" -n 1
   161  
   162  # create new branch off master
   163  git checkout master
   164  git checkout -b bump-version-<release_version>
   165  
   166  # cherry pick the commit using id from first command
   167  git cherry-pick -x <commit-id>
   168  
   169  # commit the change
   170  git push origin bump-version-<release-version>
   171  ```
   172  
   173  ## 3. Commit and Push the Release Branch
   174  
   175  In order for others to start testing, we can now push the release branch upstream and start the test process.
   176  
   177  ```shell
   178  git push upstream $RELEASE_BRANCH_NAME
   179  ```
   180  
   181  Make sure to check [helm on CircleCI](https://circleci.com/gh/helm/helm) and make sure the release passed CI before
   182  proceeding.
   183  
   184  If anyone is available, let others peer-review the branch before continuing to ensure that all the proper changes have
   185  been made and all of the commits for the release are there.
   186  
   187  ## 4. Major/Minor release: Create a Release Candidate
   188  
   189  Now that the release branch is out and ready, it is time to start creating and iterating on release candidates.
   190  
   191  ```shell
   192  git tag --sign --annotate "${RELEASE_CANDIDATE_NAME}" --message "Helm release ${RELEASE_CANDIDATE_NAME}"
   193  git push upstream $RELEASE_CANDIDATE_NAME
   194  ```
   195  
   196  CircleCI will automatically create a tagged release image and client binary to test with.
   197  
   198  For testers, the process to start testing after CircleCI finishes building the
   199  artifacts involves the following steps to grab the client:
   200  
   201  linux/amd64, using /bin/bash:
   202  
   203  ```shell
   204  wget https://get.helm.sh/helm-$RELEASE_CANDIDATE_NAME-linux-amd64.tar.gz
   205  ```
   206  
   207  darwin/amd64, using Terminal.app:
   208  
   209  ```shell
   210  wget https://get.helm.sh/helm-$RELEASE_CANDIDATE_NAME-darwin-amd64.tar.gz
   211  ```
   212  
   213  windows/amd64, using PowerShell:
   214  
   215  ```shell
   216  PS C:\> Invoke-WebRequest -Uri "https://get.helm.sh/helm-$RELEASE_CANDIDATE_NAME-windows-amd64.zip" -OutFile "helm-$ReleaseCandidateName-windows-amd64.zip"
   217  ```
   218  
   219  Then, unpack and move the binary to somewhere on your $PATH, or move it somewhere and add it to your $PATH
   220  (e.g. /usr/local/bin/helm for linux/macOS, C:\Program Files\helm\helm.exe for Windows).
   221  
   222  ## 5. Major/Minor release: Iterate on Successive Release Candidates
   223  
   224  Spend several days explicitly investing time and resources to try and break helm in every possible way, documenting any
   225  findings pertinent to the release. This time should be spent testing and finding ways in which the release might have
   226  caused various features or upgrade environments to have issues, not coding. During this time, the release is in code
   227  freeze, and any additional code changes will be pushed out to the next release.
   228  
   229  During this phase, the $RELEASE_BRANCH_NAME branch will keep evolving as you will produce new release candidates. The
   230  frequency of new candidates is up to the release manager: use your best judgement taking into account the severity of
   231  reported issues, testers' availability, and the release deadline date. Generally speaking, it is better to let a release
   232  roll over the deadline than to ship a broken release.
   233  
   234  Each time you'll want to produce a new release candidate, you will start by adding commits to the branch by
   235  cherry-picking from master:
   236  
   237  ```shell
   238  git cherry-pick -x <commit_id>
   239  ```
   240  
   241  You will also want to update the release version number and the CHANGELOG as we did in steps 2 and 3 as separate commits.
   242  
   243  After that, tag it and notify users of the new release candidate:
   244  
   245  ```shell
   246  export RELEASE_CANDIDATE_NAME="$RELEASE_NAME-rc.2"
   247  git tag --sign --annotate "${RELEASE_CANDIDATE_NAME}" --message "Helm release ${RELEASE_CANDIDATE_NAME}"
   248  git push upstream $RELEASE_CANDIDATE_NAME
   249  ```
   250  
   251  From here on just repeat this process, continuously testing until you're happy with the release candidate.
   252  
   253  ## 6. Major/Minor release: Finalize the Release
   254  
   255  When you're finally happy with the quality of a release candidate, you can move on and create the real thing.
   256  Double-check one last time to make sure everything is in order, then finally push the release tag.
   257  
   258  ```shell
   259  git checkout $RELEASE_BRANCH_NAME
   260  git tag --sign --annotate "${RELEASE_NAME}" --message "Helm release ${RELEASE_NAME}"
   261  git push upstream $RELEASE_NAME
   262  ```
   263  
   264  Verify that the release succeeded in CI. If not, you will need to fix the 
   265  release and push the release again.
   266  
   267  ## 7. PGP Sign the downloads
   268  
   269  While hashes provide a signature that the content of the downloads is what it was generated, signed packages provide
   270  traceability of where the package came from.
   271  
   272  To do this, run the following `make` commands:
   273  
   274  ```shell
   275  export VERSION="$RELEASE_NAME"
   276  make clean
   277  make fetch-dist
   278  make sign
   279  ```
   280  
   281  This will generate ascii armored signature files for each of the files pushed by CI.
   282  
   283  All of the signature files need to be uploaded to the release on GitHub.
   284  
   285  ## 8. Write the Release Notes
   286  
   287  We will auto-generate a changelog based on the commits that occurred during a release cycle, but it is usually more
   288  beneficial to the end-user if the release notes are hand-written by a human being/marketing team/dog.
   289  
   290  If you're releasing a major/minor release, listing notable user-facing features is usually sufficient. For patch
   291  releases, do the same, but make note of the symptoms and who is affected.
   292  
   293  An example release note for a minor release would look like this:
   294  
   295  ```markdown
   296  ## vX.Y.Z
   297  
   298  Helm vX.Y.Z is a feature release. This release, we focused on <insert focal point>. Users are encouraged to upgrade for the best experience.
   299  
   300  The community keeps growing, and we'd love to see you there!
   301  
   302  - Join the discussion in [Kubernetes Slack](https://kubernetes.slack.com):
   303    - `#helm-users` for questions and just to hang out
   304    - `#helm-dev` for discussing PRs, code, and bugs
   305  - Hang out at the Public Developer Call: Thursday, 9:30 Pacific via [Zoom](https://zoom.us/j/696660622)
   306  - Test, debug, and contribute charts: [GitHub/helm/charts](https://github.com/helm/charts)
   307  
   308  ## Installation and Upgrading
   309  
   310  Download Helm X.Y. The common platform binaries are here:
   311  
   312  - [MacOS amd64](https://get.helm.sh/helm-vX.Y.Z-darwin-amd64.tar.gz) ([checksum](https://get.helm.sh/helm-vX.Y.Z-darwin-amd64.tar.gz.sha256) / CHECKSUM_VAL)
   313  - [Linux amd64](https://get.helm.sh/helm-vX.Y.Z-linux-amd64.tar.gz) ([checksum](https://get.helm.sh/helm-vX.Y.Z-linux-amd64.tar.gz.sha256) / CHECKSUM_VAL)
   314  - [Linux arm](https://get.helm.sh/helm-vX.Y.Z-linux-arm.tar.gz) ([checksum](https://get.helm.sh/helm-vX.Y.Z-linux-arm.tar.gz.sha256) / CHECKSUM_VAL)
   315  - [Linux arm64](https://get.helm.sh/helm-vX.Y.Z-linux-arm64.tar.gz) ([checksum](https://get.helm.sh/helm-vX.Y.Z-linux-arm64.tar.gz.sha256) / CHECKSUM_VAL)
   316  - [Linux i386](https://get.helm.sh/helm-vX.Y.Z-linux-386.tar.gz) ([checksum](https://get.helm.sh/helm-vX.Y.Z-linux-386.tar.gz.sha256) / CHECKSUM_VAL)
   317  - [Linux ppc64le](https://get.helm.sh/helm-vX.Y.Z-linux-ppc64le.tar.gz) ([checksum](https://get.helm.sh/helm-vX.Y.Z-linux-ppc64le.tar.gz.sha256) / CHECKSUM_VAL)
   318  - [Linux s390x](https://get.helm.sh/helm-vX.Y.Z-linux-s390x.tar.gz) ([checksum](https://get.helm.sh/helm-vX.Y.Z-linux-s390x.tar.gz.sha256) / CHECKSUM_VAL)
   319  - [Windows amd64](https://get.helm.sh/helm-vX.Y.Z-windows-amd64.zip) ([checksum](https://get.helm.sh/helm-vX.Y.Z-windows-amd64.zip.sha256) / CHECKSUM_VAL)
   320  
   321  Once you have the client installed, upgrade Tiller with `helm init --upgrade`.
   322  
   323  The [Quickstart Guide](https://docs.helm.sh/using_helm/#quickstart-guide) will get you going from there. For **upgrade instructions** or detailed installation notes, check the [install guide](https://docs.helm.sh/using_helm/#installing-helm). You can also use a [script to install](https://raw.githubusercontent.com/helm/helm/master/scripts/get) on any system with `bash`.
   324  
   325  ## What's Next
   326  
   327  - vX.Y.Z+1 will contain only bug fixes.
   328  - vX.Y+1.Z is the next feature release. This release will focus on ...
   329  
   330  ## Changelog
   331  
   332  - chore(*): bump version to v2.7.0 08c1144f5eb3e3b636d9775617287cc26e53dba4 (Adam Reese)
   333  - fix circle not building tags f4f932fabd197f7e6d608c8672b33a483b4b76fa (Matthew Fisher)
   334  ```
   335  
   336  The changelog at the bottom of the release notes can be generated with this command:
   337  
   338  ```shell
   339  PREVIOUS_RELEASE=vX.Y.Z
   340  git log --no-merges --pretty=format:'- %s %H (%aN)' $PREVIOUS_RELEASE..$RELEASE_NAME
   341  ```
   342  
   343  Once finished, go into GitHub and edit the release notes for the tagged release with the notes written here. Remember to
   344  attach the ascii armored signatures generated in the previous step to the release notes.
   345  
   346  It is now worth getting other people to take a look at the release notes before the release is published. Send
   347  a request out to [#helm-dev](https://kubernetes.slack.com/messages/C51E88VDG) for review. It is always 
   348  beneficial as it can be easy to miss something.
   349  
   350  When you are ready to go, hit `publish`.
   351  
   352  ## 9. Evangelize
   353  
   354  Congratulations! You're done. Go grab yourself a $DRINK_OF_CHOICE. You've earned it.
   355  
   356  After enjoying a nice $DRINK_OF_CHOICE, go forth and announce the glad tidings of the new release in Slack and on Twitter.
   357  
   358  Optionally, write a blog post about the new release and showcase some of the new features on there!