github.com/pachyderm/pachyderm@v1.13.4/doc/release_instructions.md (about)

     1  # Release procedure
     2  
     3  ## Types of releases
     4  
     5  |ReleaseType|Example Version|Built off master|Can build off any branch| Updates docs| Can host multiple install versions |
     6  |---|---|---|---|---|---|
     7  |Point Release| v1.7.2| Y | N | Y | N |
     8  |Release Candidate| v1.8.0rc1 | Y | N | Y | N |
     9  |Custom Release | v1.8.1-aeeff234982735987affee | N | Y | N | Y |
    10  
    11  ## Requirements
    12  
    13  NOTE! At the moment, we require the release script to be run on an ubuntu
    14  machine.
    15  
    16  This is because of a dependency on CGO via
    17  [this bug](https://github.com/opencontainers/runc/issues/841), as we don't
    18  want to enable CGO in part because it doesn't play nice with macOS for us.
    19  
    20  You'll need the following credentials / tools:
    21  
    22  - A GitHub *Personal Access Token* with **repo** access
    23    - You can get your personal oauth token here: https://github.com/settings/tokens
    24  - Add your GITHUB token as env variable in your profile. This is required by goreleaser
    25    - Eg. in ~/.bash_profile add the following line `export GITHUB_TOKEN="YOUR-GH-TOKEN"`
    26  - access to `homebrew-tap` and `www` repositories
    27  - S3 credentials
    28  - A dockerhub account, with write access to
    29    [pachyderm](https://hub.docker.com/u/pachyderm/) (run `docker login`)
    30  - `goreleaser`
    31      - on linux: 
    32      ```bash
    33      pushd /usr/local/
    34      curl -sfL https://install.goreleaser.com/github.com/goreleaser/goreleaser.sh | sudo sh
    35      popd
    36      ```
    37      - on mac: `brew install goreleaser/tap/goreleaser`
    38  - `silversearcher`
    39      - on linux: `apt-get install -y silversearcher-ag`
    40      - on mac: `brew install the_silver_searcher`
    41  
    42  If you're doing a custom release (off a branch that isn't master),
    43  [skip to the section at the bottom](#custom-releases)
    44  
    45  ## Releasing
    46  
    47  The following is the procedure for point releases, rcs, or anything else off
    48  of master; i.e. for non-custom releases. For custom release instructions, see
    49  below.
    50  
    51  ### Prerequisites
    52  
    53  1. Make sure the HEAD commit (that you're about to release) has a passing
    54     build on travis.
    55  2. Make sure that you have no uncommitted files in the current branch.
    56  
    57  ### Update client version [apply step only when running point-release target]
    58  
    59  Update `src/client/version/client.go` version values.
    60  
    61  - for a major release, increment the MajorVersion and set the MinorVersion and
    62    MicroVersion to 0; e.g. `2.0.0`.
    63  - for a minor release, leave the MajorVersion unchanged, increment the
    64    MinorVersion, and set the MicroVersion to 0; e.g. `1.10.0`.
    65  - for a patch release, leave the MajorVersion and MinorVersion unchanged and
    66    increment the MicroVersion; e.g. `1.9.8`.
    67  
    68  Commit these changes locally (you will push to GitHub in a later step):
    69  
    70  ```shell
    71  make VERSION_ADDITIONAL= install
    72  git add src/client/version/client.go
    73  git commit -m"Increment version for $(pachctl version --client-only) release"
    74  ```
    75  
    76  ### Update dash, IDE versions [apply step only when running point-release target]
    77  
    78  If you want to update the version of the Pachyderm dash or IDE associated with
    79  this release, change `defaultDashVersion` or `defaultIDEVersion` respectively in
    80  `./src/server/pkg/deploy/cmds/cmds.go`.
    81  
    82  ### Update compatibility versions [apply step only when running point-release target]
    83  
    84  Commit these changes locally (you will push to GitHub in a later step):
    85  
    86  ```shell
    87  make compatibility
    88  git add etc/compatibility
    89  git commit -m"Update compatibility for $(pachctl version --client-only) release"
    90  ```
    91  
    92  Note: The update to "latest" will cause dash CI to default run with the
    93  release pointed to be latest. The latest link is only update for
    94  Major/Minor/Point releases. In order to test a new version of dash with
    95  RC/Alpha/Beta/Custom release, modify the deployment manifest to test it
    96  manually.
    97  
    98  ### Regenerate golden deployment manifests [apply step only when running point-release target]
    99  
   100  ```shell
   101  make VERSION_ADDITIONAL= regenerate-test-deploy-manifests
   102  git commit -a -m"Regenerate golden deployment manifests for $(pachctl version --client-only) release"
   103  ```
   104  
   105  ### Update the changelog [apply step only when running point-release target]
   106  
   107  Update the changelog in the branch and commit it locally. Edit `CHANGELOG.md`
   108  
   109  ```shell
   110  git commit -am "Upadate change log for $(pachctl version --client-onlt) release"
   111  ```
   112  
   113  ### Push changes [apply step only when running point-release target]
   114  
   115  ```shell
   116  git push
   117  ```
   118  
   119  ### Release! [apply step only when running point-release or release-candidate target]
   120  
   121  * To release a major, minor, or patch version, run
   122  ```shell
   123  make point-release
   124  ```
   125  * To release an alpha/beta/RC version, specify the additional text to appear in the release version and run
   126  ```shell
   127  make VERSION_ADDITIONAL=-alpha1 release-candidate
   128  OR
   129  make VERSION_ADDITIONAL=-beta1 release-candidate
   130  OR
   131  make VERSION_ADDITIONAL=-rc1 release-candidate
   132   ```
   133  
   134  ### Release notes [apply step only when running point-release target]
   135  * [Release notes](https://github.com/pachyderm/pachyderm/releases) are automatically
   136  updated in GitHub. These are pulled from `CHANGELOG.md`. Check to make sure the notes
   137  are correct. Edit the release on GitHub to manually update any changes.
   138  
   139  * Post update in the #users channel with the following template
   140  ```shell
   141  @here Hi All,
   142      We’ve just released Pachyderm <X.Y.Z> — check it out!
   143      * RELEASE NOTES with links to PRs
   144  ```
   145  
   146  ### New major or minor releases
   147  
   148  In the case of a new major or minor release (x.0.0 or 1.x.0), you will need
   149  to make a couple of additional changes. See
   150  [this document](./major_minor_release_instructions.md) for details.
   151  
   152  ## Custom releases
   153  
   154  Occasionally we have a need for a custom release off a non-master branch. This
   155  is usually because some features we need to supply to users that are
   156  incompatible with features on master, but the features on master we need to
   157  keep longer-term.
   158  
   159  Assuming the prerequisites are met, making a custom release should simply be a
   160  matter of running `make custom-release`. This will create a release like
   161  `v1.2.3-2342345aefda9879e87ad`, which can be installed like:
   162  
   163  ```shell
   164  curl -o /tmp/pachctl.deb -L https://github.com/pachyderm/pachyderm/releases/download/v1.2.3-2342345aefda9879e87ad/pachctl_1.2.3-2342345aefda9879e87ad_amd64.deb && sudo dpkg -i /tmp/pachctl.deb
   165  ```
   166  
   167  Or for mac/brew:
   168  
   169  ```shell
   170  # Where 1.2 is the major.minor version of the release you just did,
   171  # and you use the right commit SHA as well in the URL
   172  brew install https://raw.githubusercontent.com/pachyderm/homebrew-tap/1.2.3-2342345aefda9879e87ad/pachctl@1.2.rb
   173  ```
   174  
   175  ## If the release failed
   176  
   177  You'll need to delete the *release* and the *release tag* in github. Navigate
   178  to the [pachyderm repo](https://www.github.com/pachyderm/pachyderm) and click
   179  on the *Releases* tab. Click on the big, blue version number corresponding to
   180  the release you want to delete, and you should be redirected to a page with
   181  just that release, and red "Delete" button on the top right. Click the delete
   182  button.
   183  
   184  From here, go back to the list of Pachyderm releases, and click "tags". Click
   185  on the tag for the release you want to delete, and then click "delete" again
   186  to delete the tag.
   187  
   188  At this point, you can re-run the release process when you're ready.
   189  
   190  ## Rolling back a release
   191  
   192  If a release has a problem and needs to be withdrawn, the steps in rolling
   193  back a release are similar to the steps under "If the release failed". In
   194  general, you'll need to:
   195  - Delete the tag and GitHub Release for both the bad release *and the most
   196    recent good release*
   197  - Re-release the previous version (to update homebrew)
   198  
   199  All of these can be accomplished by:
   200  - Following the steps under "If the release failed" for deleting the tag and
   201    GitHub release for both the bad release
   202  - Checking out the git commit associated with the most recent good release
   203    (`git checkout tags/v<good release>`). Save this commit SHA
   204    (`git rev-list tags/v<good> --max-count=1`), in case you need it later, as
   205    we'll be deleting the tag.
   206  - Delete the tag and GitHub release for the last good release (the one you
   207    just checked out)
   208  - Syncing your local Git tags with the set of tags on Github (either re-clone
   209    the Pachyderm repo, or run
   210    `git tag -l | xargs git tag -d; git fetch origin master --tags`). This
   211    prevents the release process from failing with `tag already exists`.
   212  - Run `make point-release` (or follow the release process for custom releases)