Skip to content

Commit fc7162b

Browse files
authored
Merge pull request #426 from thockin/release-3.x
Update RELEASING doc
2 parents 3dc0c23 + 9bc9565 commit fc7162b

File tree

1 file changed

+81
-11
lines changed

1 file changed

+81
-11
lines changed

RELEASING.md

Lines changed: 81 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,95 @@
11
# Cutting a release
22

3+
## Tags
4+
5+
First, see what has been tagged:
6+
37
```
48
$ git tag
5-
v2.0.0
6-
v2.0.1
7-
v2.0.2
8-
v2.0.3
9-
v2.0.4
9+
v3.2.0
10+
v3.2.1
11+
v3.2.2
12+
v3.3.0
13+
v3.3.1
14+
```
15+
16+
Pick the next release number and tag it.
17+
18+
```
19+
$ git tag -am v3.3.2 v3.3.2
20+
```
21+
22+
## Build and push to staging
23+
24+
To build git-sync you need [docker buildx](https://github.com/docker/buildx)
25+
and to cut a release you need
26+
[manifest-tool](https://github.com/estesp/manifest-tool). At the time of this
27+
writing, manifest-tool is broken at head and doesn't support go modules yet:
28+
29+
```
30+
$ GO111MODULE=off go get github.com/estesp/manifest-tool/cmd/manifest-tool
31+
32+
$ cd "$(go env GOPATH)/src/github.com/estesp/manifest-tool"
33+
34+
$ git checkout v1.0.3
35+
Note: switching to 'v1.0.3'.
36+
37+
You are in 'detached HEAD' state. You can look around, make experimental
38+
changes and commit them, and you can discard any commits you make in this
39+
state without impacting any branches by switching back to a branch.
40+
41+
If you want to create a new branch to retain commits you create, you may
42+
do so (now or later) by using -c with the switch command. Example:
1043
11-
# Pick the next release number
44+
git switch -c <new-branch-name>
1245
13-
$ git tag -am "v2.0.5" v2.0.5
46+
Or undo this operation with:
1447
48+
git switch -
49+
50+
Turn off this advice by setting config variable advice.detachedHead to false
51+
52+
HEAD is now at 505479b Merge pull request #101 from estesp/prep-1.0.3
53+
54+
$ GO111MODULE=off go install .
55+
```
56+
57+
The following step will build for all platforms and push the container images
58+
to our staging repo (gcr.io/k8s-staging-git-sync).
59+
60+
```
1561
$ make manifest-list
1662
<...lots of output...>
17-
Successfully tagged staging-k8s.gcr.io/git-sync:v2.0.5__linux_amd64
63+
Successfully tagged gcr.io/k8s-staging-git-sync/git-sync:v3.3.2__linux_amd64
1864
<...lots of output...>
19-
v2.0.5__linux_amd64: digest: sha256:74cd8777ba08c7b725cd2f6de34a638ba50b48cde59f829e1dc982c8c8c9959a size: 951
20-
pushed: staging-k8s.gcr.io/git-sync:v2.0.5__linux_amd64
65+
v3.3.2__linux_amd64: digest: sha256:74cd8777ba08c7b725cd2f6de34a638ba50b48cde59f829e1dc982c8c8c9959a size: 951
66+
pushed: gcr.io/k8s-staging-git-sync/git-sync:v3.3.2__linux_amd64
2167
<...lots of output...>
22-
Digest: sha256:4d338888373809661b5a29314ca8024379b77c0afb53fd66d6821cf628f75438 433
68+
Digest: sha256:853ae812df916e59a7b27516f791ea952d503ad26bc8660deced8cd528f128ae 433
2369
```
2470

71+
Take note of this final sha256.
72+
73+
## Promote the images
74+
75+
Make a PR against
76+
https://github.com/kubernetes/k8s.io/blob/main/k8s.gcr.io/images/k8s-staging-git-sync/images.yaml
77+
and add the sha256 and tag name from above. For example:
78+
79+
```
80+
- name: git-sync
81+
dmap:
82+
+ "sha256:853ae812df916e59a7b27516f791ea952d503ad26bc8660deced8cd528f128ae": ["v3.3.2"]
83+
"sha256:95bfb980d3b640f6015f0d1ec25c8c0161d0babcf83d31d4c0453dd2b59923db": ["v3.3.1"]
84+
"sha256:5f3d12cb753c6cd00c3ef9cc6f5ce4e584da81d5210c15653644ece675f19ec6": ["v3.3.0"]
85+
"sha256:6a543fb2d1e92008aad697da2672478dcfac715e3dddd33801d772da6e70cf24": ["v3.2.2"]
86+
```
87+
88+
When that PR is merged, the promoter bot will copy the images from staging to
89+
the final prod location (e.g. k8s.gcr.io/git-sync/git-sync:v3.3.2).
90+
91+
## Make a GitHub release
92+
2593
Lastly, make a release through the [github UI](https://github.com/kubernetes/git-sync/releases).
94+
Include all the notable changes since the last release and the final container
95+
image location.

0 commit comments

Comments
 (0)