Skip to content

Commit 1caf02d

Browse files
phlogistonjohnobnoxxx
authored andcommitted
docs: add a release process document
This is based on the processed followed to create the recent release and should serve as a guide in case someone else does a future release. Signed-off-by: John Mulligan <[email protected]>
1 parent 77e33ff commit 1caf02d

File tree

1 file changed

+119
-0
lines changed

1 file changed

+119
-0
lines changed

docs/release-process.md

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
# samba-container Release Process
2+
3+
## Preparation
4+
5+
The smbmetrics project has a dedicated branch, called `release`, for release
6+
versions. This is done to update files, in particular the Dockerfile, that
7+
control dependencies and versioning. Tags are applied directly to this branch
8+
and only this branch.
9+
10+
11+
### Tagging
12+
13+
Prior to tagging, we must update the `release` branch to "contain" all the
14+
latest changes from the `main` branch. We do this by merging `main` into
15+
`release`.
16+
Example:
17+
18+
```
19+
git checkout main
20+
git pull --ff-only
21+
git checkout release
22+
git pull --ff-only
23+
git merge main
24+
# resolve any conflicts
25+
```
26+
27+
Now we need to "pin" the appropriate version of the samba-server container
28+
dependency. Edit `Dockerfile` and change the tag part of the "FROM" line with
29+
the `quay.io/samba.org/samba-server` image repository to use the latest
30+
released samba-server tag.
31+
32+
At this point, an optional but recommended step is to do a test build before
33+
tagging. Run `make image-build`.
34+
35+
If you are happy with the content of the `release` branch, tag it. Example:
36+
37+
```
38+
git checkout release
39+
git tag -a -m 'Release v0.5' v0.5
40+
```
41+
42+
This creates an annotated tag. Release tags must be annotated tags.
43+
44+
### Build
45+
46+
Using the tagged `release` branch, the container images for release will be
47+
built. It is very important to ensure that base images are up-to-date.
48+
It is very important to ensure that you perform the next set of steps with
49+
clean new builds and do not use cached images. To accomplish both tasks it
50+
is recommended to purge your local container engine of cached images
51+
(Example: `podman image rm --all`). You should have no images named like
52+
`quay.io/samba.org` in your local cache.
53+
54+
Build the images from scratch. Example:
55+
```
56+
make image-build
57+
```
58+
59+
For the image that was just built, apply a temporary pre-release tag
60+
to it. Example:
61+
```
62+
podman tag quay.io/samba.org/samba-metrics:{latest,v0.5pre1}
63+
```
64+
65+
Log into quay.io. Push the images to quay.io using the temporary tag. Example:
66+
```
67+
podman push quay.io/samba.org/samba-metrics:{latest,v0.5pre1}
68+
```
69+
70+
Wait for the security scan to complete. There shouldn't be any issues if you
71+
properly updated the base images before building. If there are issues and you
72+
are sure you used the newest base images, check the base images on quay.io and
73+
make sure that the number of issues are identical. The security scan can take
74+
some time, while it runs you may want to do other things.
75+
76+
77+
## GitHub Release
78+
79+
When you are satisfied that the tagged version is suitable for release, you
80+
can push the tag to the public repo:
81+
```
82+
git push --follow-tags
83+
```
84+
85+
Draft a new set of release notes. Select the recently pushed tag. Start with
86+
the auto-generated release notes from GitHub (activate the `Generate release
87+
notes` button/link). Add an introductory section (see previous notes for an
88+
example). Add a "Highlights" section if there are any notable features or fixes
89+
in the release. The Highlights section can be skipped if the content of the
90+
release is unremarkable (e.g. few changes occurred since the previous release).
91+
92+
Because this is a container based release we do not provide any build artifacts
93+
on GitHub (beyond the sources automatically provided there). Instead we add
94+
a Downloads section that notes the exact tags and digests that the images can
95+
be found at on quay.io.
96+
97+
Use the following partial snippet as an example:
98+
```
99+
## Download
100+
101+
Images built for this release can be obtained from the quay.io image registry.
102+
103+
* By tag: quay.io/samba.org/samba-metrics:v0.5
104+
* By digest: quay.io/samba.org/samba-metrics@sha256:09c867343af39b237230f94a734eacc8313f2330c7d934994522ced46b740715
105+
```
106+
... using the image that was pushed earlier
107+
108+
The tag is pretty obvious - it should match the image tag (minus any pre-release
109+
marker). You can get the digest from the tag using the quay.io UI (do not use
110+
any local digest hashes). Click on the SHA256 link and then copy the full
111+
manifest hash using the UI widget that appears.
112+
113+
Perform a final round of reviews, as needed, for the release notes and then
114+
publish the release.
115+
116+
Once the release notes are drafted and then either immediately before or after
117+
publishing them, use the quay.io UI to copy each pre-release tag to the "latest"
118+
tag and a final "vX.Y" tag. Delete the temporary pre-release tags using the
119+
quay.io UI as they are no longer needed.

0 commit comments

Comments
 (0)