Skip to content

Commit 31ebc8e

Browse files
authored
Merge pull request #1594 from roycaihw/doc/release
Document how to use the release script
2 parents 549482d + 03d812d commit 31ebc8e

File tree

1 file changed

+57
-9
lines changed

1 file changed

+57
-9
lines changed

devel/release.md

Lines changed: 57 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,61 @@ report issues. Typically, there is a single alpha or beta release, but if there
1515
are a higher than expected number of issues there can be multiple releases
1616
(e.g, a2 or b2).
1717

18-
## 1. Update submodules
18+
## Automated release
19+
20+
### 1. (Optional) Update submodules
21+
22+
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.
23+
24+
### 2. Run the release script and send a PR
25+
26+
```
27+
export MINOR_VERSION=x
28+
export PATCH_VERSION=y # The latest patch version for the minor version. Not required for snapshot.
29+
```
30+
To create a snapshot:
31+
```
32+
$ KUBERNETES_BRANCH=release-1.${MINOR_VERSION} CLIENT_VERSION=${MINOR_VERSION}.0.0-snapshot DEVELOPMENT_STATUS="3 - Alpha" scripts/release.sh
33+
```
34+
To create an a1 release:
35+
```
36+
$ KUBERNETES_BRANCH=release-1.${MINOR_VERSION} CLIENT_VERSION=${MINOR_VERSION}.${PATCH_VERSION}.0a1 DEVELOPMENT_STATUS="3 - Alpha" scripts/release.sh
37+
```
38+
To create a b1 release:
39+
```
40+
$ KUBERNETES_BRANCH=release-1.${MINOR_VERSION} CLIENT_VERSION=${MINOR_VERSION}.${PATCH_VERSION}.0b1 DEVELOPMENT_STATUS="4 - Beta" scripts/release.sh
41+
```
42+
To create a stable release:
43+
```
44+
$ KUBERNETES_BRANCH=release-1.${MINOR_VERSION} CLIENT_VERSION=${MINOR_VERSION}.${PATCH_VERSION}.0 DEVELOPMENT_STATUS="5 - Production/Stable" scripts/release.sh
45+
```
46+
Checkout the generated local branch (named "automated-release-of-xxx") to
47+
continue with the remaining steps.
48+
49+
### 3. README (not required for snapshots)
50+
51+
Update the compatibility matrix and maintenance status in the README file.
52+
53+
### 4. Submit pull request
54+
55+
For snapshots, create a PR against the master repo.
56+
57+
For actual releases, create:
58+
- a PR against the release branch
59+
- a second PR against the master branch to cherrypick the CHANGELOG and README
60+
changes.
61+
62+
### 5. (Repo admin) Create release branch
63+
64+
After merging a new snapshot, create a release branch from the master branch.
65+
66+
## (Deprecated) Manual release
67+
68+
### 1. Update submodules
1969

2070
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.
2171

22-
## 2. Create or update release branch
72+
### 2. Create or update release branch
2373

2474
The release branch name should have release-x.x format. All minor and pre-releases
2575
should be on the same branch. To update an existing branch with master (only for
@@ -36,7 +86,7 @@ git pull -X theirs upstream master
3686
You may need to fix some conflicts. For auto-generated files, you can commit
3787
either version. They will be updated to the current version in the next step.
3888

39-
## 3. Update release tags
89+
### 3. Update release tags
4090

4191
Release tags are in the "scripts/constants.py" file. These are the constants you
4292
may need to update:
@@ -73,7 +123,7 @@ apply the manual fixes.***
73123
git push upstream $RELEASE_BRANCH
74124
```
75125

76-
## 4. Hot issues
126+
### 4. Hot issues
77127

78128
Use the `scripts/apply-hotfixes.sh` script to apply the fixes below in one step.
79129
**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,19 +149,19 @@ For more details, see [#974](https://github.com/kubernetes-client/python/issues/
99149

100150
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.
101151

102-
## 5. CHANGELOG
152+
### 5. CHANGELOG
103153

104154
Make sure the change logs are up to date [here](https://github.com/kubernetes-client/python/blob/master/CHANGELOG.md).
105155
If they are not, follow commits added after the last release and update/commit
106156
the change logs to master.
107157

108158
Then based on the release, follow one of next two steps.
109159

110-
## 6. README
160+
### 6. README
111161

112162
Update the compatibility matrix and maintenance status in the README file.
113163

114-
## Submit pull request
164+
### Submit pull request
115165

116166
Typically after the you've completed steps 2-6 above you can push your changes
117167
open a pull request against `kubernetes-client:release-x.y`
@@ -220,6 +270,4 @@ deactivate
220270
rm -rf .release
221271
```
222272

223-
TODO: Convert steps in this document to an (semi-) automated script.
224-
225273
ref: https://packaging.python.org/distributing/

0 commit comments

Comments
 (0)