From 3115f790e33f25d4be47931caa17229ad9673951 Mon Sep 17 00:00:00 2001 From: Haowei Cai Date: Mon, 25 Oct 2021 13:34:01 -0700 Subject: [PATCH 1/2] Document how to use the release script --- devel/release.md | 55 ++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 46 insertions(+), 9 deletions(-) diff --git a/devel/release.md b/devel/release.md index 9802f2de13..c0ae13e1cd 100644 --- a/devel/release.md +++ b/devel/release.md @@ -15,11 +15,50 @@ report issues. Typically, there is a single alpha or beta release, but if there are a higher than expected number of issues there can be multiple releases (e.g, a2 or b2). -## 1. Update submodules +## Automated release + +### 1. (Optional) Update submodules + +Update submodules by referring to this [link](https://github.com/kubernetes-client/python/blob/master/devel/submodules.md#update-submodule). Commit the changes and open a pull request. + +### 2. Run the release script and send a PR + +``` +export MINOR_VERSION=x +export PATCH_VERSION=y # The latest patch version for the minor version. Not required for snapshot. +``` +To create a snapshot: +``` +$ KUBERNETES_BRANCH=release-1.${MINOR_VERSION} CLIENT_VERSION=${MINOR_VERSION}.0.0-snapshot DEVELOPMENT_STATUS="3 - Alpha" scripts/release.sh +``` +To create an a1 release: +``` +$ KUBERNETES_BRANCH=release-1.${MINOR_VERSION} CLIENT_VERSION=${MINOR_VERSION}.${PATCH_VERSION}.0a1 DEVELOPMENT_STATUS="3 - Alpha" scripts/release.sh +``` +To create a b1 release: +``` +$ KUBERNETES_BRANCH=release-1.${MINOR_VERSION} CLIENT_VERSION=${MINOR_VERSION}.${PATCH_VERSION}.0b1 DEVELOPMENT_STATUS="4 - Beta" scripts/release.sh +``` +To create a stable release: +``` +$ KUBERNETES_BRANCH=release-1.${MINOR_VERSION} CLIENT_VERSION=${MINOR_VERSION}.${PATCH_VERSION}.0 DEVELOPMENT_STATUS="5 - Production/Stable" scripts/release.sh +``` +### 3. README + +Update the compatibility matrix and maintenance status in the README file. + +### Submit pull request + +Typically after the you've completed steps 2-6 above you can push your changes +open a pull request against `kubernetes-client:release-x.y` + +## (Deprecated) Manual release + +### 1. Update submodules Update submodules by referring to this [link](https://github.com/kubernetes-client/python/blob/master/devel/submodules.md#update-submodule). Commit the changes and open a pull request. -## 2. Create or update release branch +### 2. Create or update release branch The release branch name should have release-x.x format. All minor and pre-releases should be on the same branch. To update an existing branch with master (only for @@ -36,7 +75,7 @@ git pull -X theirs upstream master You may need to fix some conflicts. For auto-generated files, you can commit either version. They will be updated to the current version in the next step. -## 3. Update release tags +### 3. Update release tags Release tags are in the "scripts/constants.py" file. These are the constants you may need to update: @@ -73,7 +112,7 @@ apply the manual fixes.*** git push upstream $RELEASE_BRANCH ``` -## 4. Hot issues +### 4. Hot issues Use the `scripts/apply-hotfixes.sh` script to apply the fixes below in one step. **As mentioned above, the script should be run after finishing the section "Update release tags". Also, ensure a clean working directory before applying the script.** @@ -99,7 +138,7 @@ For more details, see [#974](https://github.com/kubernetes-client/python/issues/ 5. Add tests for the default `Configuration` behavior (ref: https://github.com/kubernetes-client/python/pull/1303 and https://github.com/kubernetes-client/python/pull/1285). The commit [1ffa61d0650e4c93e0d7f0becd2c54797eafd407](https://github.com/kubernetes-client/python/pull/1285/commits/1ffa61d0650e4c93e0d7f0becd2c54797eafd407) should be cherry-picked. -## 5. CHANGELOG +### 5. CHANGELOG Make sure the change logs are up to date [here](https://github.com/kubernetes-client/python/blob/master/CHANGELOG.md). If they are not, follow commits added after the last release and update/commit @@ -107,11 +146,11 @@ the change logs to master. Then based on the release, follow one of next two steps. -## 6. README +### 6. README Update the compatibility matrix and maintenance status in the README file. -## Submit pull request +### Submit pull request Typically after the you've completed steps 2-6 above you can push your changes open a pull request against `kubernetes-client:release-x.y` @@ -220,6 +259,4 @@ deactivate rm -rf .release ``` -TODO: Convert steps in this document to an (semi-) automated script. - ref: https://packaging.python.org/distributing/ From 03d812dc6d3bf37aaeb4f6dd6878dbee94b8885c Mon Sep 17 00:00:00 2001 From: Haowei Cai Date: Mon, 25 Oct 2021 15:16:49 -0700 Subject: [PATCH 2/2] fixup! Document how to use the release script --- devel/release.md | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/devel/release.md b/devel/release.md index c0ae13e1cd..ec26475683 100644 --- a/devel/release.md +++ b/devel/release.md @@ -43,14 +43,25 @@ To create a stable release: ``` $ KUBERNETES_BRANCH=release-1.${MINOR_VERSION} CLIENT_VERSION=${MINOR_VERSION}.${PATCH_VERSION}.0 DEVELOPMENT_STATUS="5 - Production/Stable" scripts/release.sh ``` -### 3. README +Checkout the generated local branch (named "automated-release-of-xxx") to +continue with the remaining steps. + +### 3. README (not required for snapshots) Update the compatibility matrix and maintenance status in the README file. -### Submit pull request +### 4. Submit pull request -Typically after the you've completed steps 2-6 above you can push your changes -open a pull request against `kubernetes-client:release-x.y` +For snapshots, create a PR against the master repo. + +For actual releases, create: +- a PR against the release branch +- a second PR against the master branch to cherrypick the CHANGELOG and README + changes. + +### 5. (Repo admin) Create release branch + +After merging a new snapshot, create a release branch from the master branch. ## (Deprecated) Manual release