Add scripts for tagging Velero releases (#2592)

* Add release tools

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>

* Document the tag-release release tool

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>

* Make sure the upstream used is correct

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>

* Add copyright statement

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>

* Address review feedback

* Pause to allow for cherry-picking on the release branch before pushing
  it
* Move master branch logic into an else statement
* Correct typo

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>

* Uncomment check for dirty git working tree

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
This commit is contained in:
Nolan Brubaker
2020-07-08 14:56:18 -07:00
committed by GitHub
parent 695715ff6a
commit c8f4b60b5b
4 changed files with 266 additions and 12 deletions
+2 -12
View File
@@ -54,18 +54,8 @@ You may regenerate the token for every release if you prefer.
This process is the same for both pre-release and GA, except for the fact that there will not be a blog post PR to merge for pre-release versions.
1. Merge the changelog + docs PR, so that it's included in the release tag.
1. Make sure your working directory is clean: `git status` should show `nothing to commit, working tree clean`.
1. Run `git fetch upstream master && git checkout upstream/master`.
1. Run `git tag $VELERO_VERSION (e.g. `git tag v1.2.0` or `git tag v1.2.0-beta.1`).
1. Run `git push upstream $VELERO_VERSION` (e.g. `git push upstream v1.2.0` or `git push upstream v1.2.0-beta.1`). This will trigger the github action that builds/publishes the Docker images.
1. Generate the GitHub release (it will be created in "Draft" status, which means it's not visible to the outside world until you click "Publish"):
```bash
GITHUB_TOKEN=your-github-token \
RELEASE_NOTES_FILE=changelogs/CHANGELOG-<major>.<minor>.md \
PUBLISH=true \
make release
```
1. Set your GitHub token as an environment variable. `export GITHUB_TOKEN=<your token value>`
1. Run `/hack/release-tools/tag-release.sh` and follow the instructions.
1. Navigate to the draft GitHub release, at https://github.com/vmware-tanzu/velero/releases.
1. If this is a patch release (e.g. `v1.2.1`), note that the full `CHANGELOG-1.2.md` contents will be included in the body of the GitHub release. You need to delete the previous releases' content (e.g. `v1.2.0`'s changelog) so that only the latest patch release's changelog shows.