Skip to content

Commit c2e7a05

Browse files
infernus01tekton-robot
authored andcommitted
chore: Update release documentation for v0.3.4
Signed-off-by: Shubham Bhardwaj <shubbhar@redhat.com>
1 parent bef2175 commit c2e7a05

File tree

2 files changed

+181
-105
lines changed

2 files changed

+181
-105
lines changed

releases.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,16 @@ Further documentation available:
3838

3939
### v0.3
4040

41-
- **Latest Release**: [v0.3.3](https://github.com/tektoncd/pruner/releases/tag/v0.3.3)
42-
(2025-12-01)
43-
([docs](https://github.com/tektoncd/pruner/tree/v0.3.3/docs),
44-
[tutorials](https://github.com/tektoncd/pruner/tree/v0.3.3/docs/tutorials/README.md))
41+
- **Latest Release**: [v0.3.4](https://github.com/tektoncd/pruner/releases/tag/v0.3.4)
42+
(2025-12-23)
43+
([docs](https://github.com/tektoncd/pruner/tree/v0.3.4/docs),
44+
[tutorials](https://github.com/tektoncd/pruner/tree/v0.3.4/docs/tutorials/README.md))
4545
- **Initial Release**: [v0.3.0](https://github.com/tektoncd/pruner/releases/tag/v0.3.0)
4646
(2025-11-07)
4747
- **Patch Releases**: [v0.3.0](https://github.com/tektoncd/pruner/releases/tag/v0.3.0),
4848
[v0.3.1](https://github.com/tektoncd/pruner/releases/tag/v0.3.1),
49-
[v0.3.3](https://github.com/tektoncd/pruner/releases/tag/v0.3.3)
49+
[v0.3.3](https://github.com/tektoncd/pruner/releases/tag/v0.3.3),
50+
[v0.3.4](https://github.com/tektoncd/pruner/releases/tag/v0.3.4)
5051

5152
### Required Kubernetes Version
5253

tekton/release-cheat-sheet.md

Lines changed: 175 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -6,144 +6,180 @@ the pruner repo, a terminal window and a text editor.
66

77
1. [Setup a context to connect to the dogfooding cluster](#setup-dogfooding-context) if you haven't already.
88

9-
2. `cd` to root of Pruner git checkout.
9+
1. Install the [rekor CLI](https://docs.sigstore.dev/rekor/installation/) if you haven't already.
1010

11-
3. Make sure the release `Pipeline` is up-to-date on the cluster.
11+
1. `cd` to root of Pruner git checkout.
1212

13-
- [pruner-release](https://github.com/tektoncd/pruner/blob/main/tekton/release-pipeline.yaml)
14-
```shell script
15-
kubectl apply -f tekton/release-pipeline.yaml
16-
```
13+
1. [Install kustomize](https://kubectl.docs.kubernetes.io/installation/kustomize) if you haven't already.
1714

18-
4. Select the commit you would like to build the release from, most likely the
19-
most recent commit at https://github.com/tektoncd/pruner/commits/main
20-
and note the commit's hash.
15+
1. Select the commit you would like to build the release from (NOTE: the commit is full (40-digit) hash.)
16+
- Select the most recent commit on the ***main branch*** if you are cutting a major or minor release i.e. `x.0.0` or `0.x.0`
17+
- Select the most recent commit on the ***`release-<version number>x` branch***, e.g. [`release-v0.3.x`](https://github.com/tektoncd/pruner/tree/release-v0.3.x) if you are patching a release i.e. `v0.3.4`.
2118

22-
5. Create environment variables for bash scripts in later steps.
19+
1. Ensure the correct version of the release pipeline is installed on the cluster.
20+
To do that, the selected commit should be checked-out locally
2321

2422
```bash
25-
VERSION_TAG=# UPDATE THIS. Example: v0.6.2
26-
PRUNER_RELEASE_GIT_SHA=# SHA of the release to be released
23+
kustomize build tekton | kubectl --context dogfooding replace -f -
2724
```
2825

29-
6. Confirm commit SHA matches what you want to release.
26+
1. Create a `release.env` file with environment variables for bash scripts in later steps, and source it:
27+
28+
```bash
29+
cat <<EOF > release.env
30+
PRUNER_VERSION= # Example: v0.3.4
31+
PRUNER_RELEASE_GIT_SHA= # SHA of the release to be released, e.g. 5b082b1106753e093593d12152c82e1c4b0f37e5
32+
PRUNER_OLD_VERSION= # Example: v0.3.3
33+
TEKTON_PACKAGE=tektoncd/pruner
34+
PRUNER_REPO_NAME=pruner
35+
EOF
36+
. ./release.env
37+
```
38+
39+
1. Confirm commit SHA matches what you want to release.
3040
3141
```bash
3242
git show $PRUNER_RELEASE_GIT_SHA
3343
```
3444
35-
7. Create a workspace template file:
45+
1. Create a workspace template file:
3646
3747
```bash
38-
cat <<EOF > workspace-template.yaml
48+
WORKSPACE_TEMPLATE=$(mktemp /tmp/workspace-template.XXXXXX.yaml)
49+
cat <<'EOF' > $WORKSPACE_TEMPLATE
3950
spec:
40-
accessModes:
41-
- ReadWriteOnce
42-
resources:
43-
requests:
44-
storage: 1Gi
51+
accessModes:
52+
- ReadWriteOnce
53+
resources:
54+
requests:
55+
storage: 1Gi
4556
EOF
4657
```
4758
48-
8. Execute the release pipeline.
59+
1. Execute the release pipeline.
60+
61+
**The minimum required tkn version is v0.30.0 or later**
4962
5063
**If you are back-porting include this flag: `--param=releaseAsLatest="false"`**
5164
5265
```bash
53-
tkn --context dogfooding pipeline start pruner-release \
54-
--param package=github.com/tektoncd/pruner \
55-
--param repoName=pruner \
56-
--param imageRegistry=ghcr.io \
57-
--param imageRegistryPath=tektoncd/pruner \
58-
--param imageRegistryRegions="" \
59-
--param imageRegistryUser=tekton-robot \
60-
--param gitRevision="${PRUNER_RELEASE_GIT_SHA}" \
61-
--param versionTag="${VERSION_TAG}" \
62-
--param serviceAccountImagesPath=credentials \
63-
--param releaseBucket=tekton-releases \
64-
--param koExtraArgs="" \
65-
--workspace name=release-secret,secret=oci-release-secret \
66-
--workspace name=release-images-secret,secret=ghcr-creds \
67-
--workspace name=workarea,volumeClaimTemplateFile=workspace-template.yaml
68-
```
69-
70-
9. Watch logs of pruner-release.
66+
tkn --context dogfooding pipeline start pruner-release \
67+
--param package=github.com/tektoncd/pruner \
68+
--param repoName="${PRUNER_REPO_NAME}" \
69+
--param gitRevision="${PRUNER_RELEASE_GIT_SHA}" \
70+
--param imageRegistry=ghcr.io \
71+
--param imageRegistryPath=tektoncd/pruner \
72+
--param imageRegistryRegions="" \
73+
--param imageRegistryUser=tekton-robot \
74+
--param serviceAccountImagesPath=credentials \
75+
--param versionTag="${PRUNER_VERSION}" \
76+
--param releaseBucket=tekton-releases \
77+
--param koExtraArgs="" \
78+
--workspace name=release-secret,secret=oci-release-secret \
79+
--workspace name=release-images-secret,secret=ghcr-creds \
80+
--workspace name=workarea,volumeClaimTemplateFile="${WORKSPACE_TEMPLATE}" \
81+
--tasks-timeout 2h \
82+
--pipeline-timeout 3h
83+
```
7184
72-
10. Once the pipeline run is complete, check its results:
85+
Accept the default values of the parameters (except for "releaseAsLatest" if backporting).
7386
74-
```bash
75-
tkn --context dogfooding pr describe <pipeline-run-name>
87+
1. Watch logs of pruner-release.
7688
77-
(...)
78-
📝 Results
89+
1. Once the pipeline is complete, check its results:
7990
80-
NAME VALUE
81-
commit-sha 6ea31d92a97420d4b7af94745c45b02447ceaa19
82-
release-file https://infra.tekton.dev/tekton-releases/pruner/previous/v0.13.0/release.yaml
83-
release-file-no-tag https://infra.tekton.dev/tekton-releases/pruner/previous/v0.13.0/release.notag.yaml
91+
```bash
92+
tkn --context dogfooding pr describe <pipeline-run-name>
8493
85-
(...)
86-
```
94+
(...)
95+
📝 Results
8796
88-
The `commit-sha` should match `$PRUNER_RELEASE_GIT_SHA`.
89-
The two URLs can be opened in the browser or via `curl` to download the release manifests.
97+
NAME VALUE
98+
∙ commit-sha ff6d7abebde12460aecd061ab0f6fd21053ba8a7
99+
∙ release-file https://infra.tekton.dev/tekton-releases/pruner/previous/v0.3.4/release.yaml
100+
∙ release-file-no-tag https://infra.tekton.dev/tekton-releases/pruner/previous/v0.3.4/release.notag.yaml
90101
91-
11. The YAMLs are now released! Anyone installing Tekton pruner will now get the new version. Time to create a new GitHub release announcement:
102+
(...)
103+
```
92104
93-
12. Create additional environment variables
105+
The `commit-sha` should match `$PRUNER_RELEASE_GIT_SHA`.
106+
The two URLs can be opened in the browser or via `curl` to download the release manifests.
94107
95-
```bash
96-
PRUNER_OLD_VERSION=# Example: v0.11.1
97-
TEKTON_PACKAGE=tektoncd/pruner
98-
```
108+
1. The YAMLs are now released! Anyone installing Tekton Pruner will get the new version. Time to create a new GitHub release announcement:
99109
100-
13. Find the Rekor UUID for the release
110+
1. Find the Rekor UUID for the release
101111
102112
```bash
103-
RELEASE_FILE=https://infra.tekton.dev/tekton-releases/pruner/previous/${VERSION_TAG}/release.yaml
104-
CONTROLLER_IMAGE_SHA=$(curl $RELEASE_FILE | sed -n 's/"//g;s/.*ghcr\.io.*controller.*@//p;')
113+
RELEASE_FILE=https://infra.tekton.dev/tekton-releases/pruner/previous/${PRUNER_VERSION}/release.yaml
114+
CONTROLLER_IMAGE_SHA=$(curl -L $RELEASE_FILE | sed -n 's/"//g;s/.*ghcr\.io.*controller.*@//p;')
105115
REKOR_UUID=$(rekor-cli search --sha $CONTROLLER_IMAGE_SHA | grep -v Found | head -1)
106116
echo -e "CONTROLLER_IMAGE_SHA: ${CONTROLLER_IMAGE_SHA}\nREKOR_UUID: ${REKOR_UUID}"
107117
```
108118
109-
14. Execute the Draft Release task.
110-
111-
```bash
112-
tkn --context dogfooding pipeline start \
113-
--workspace name=shared,volumeClaimTemplateFile=workspace-template.yaml \
114-
--workspace name=credentials,secret=oci-release-secret \
115-
-p package="${TEKTON_PACKAGE}" \
116-
-p git-revision="${PRUNER_RELEASE_GIT_SHA}" \
117-
-p release-tag="${VERSION_TAG}" \
118-
-p previous-release-tag="${PRUNER_OLD_VERSION}" \
119-
-p release-name="Tekton Pruner" \
120-
-p bucket="tekton-releases" \
121-
-p rekor-uuid="$REKOR_UUID" \
122-
release-draft
123-
```
124-
125-
15. Watch logs of create-draft-release. On successful completion, a URL will be logged. Visit that URL and look through the release notes.
126-
127-
16. Manually add upgrade and deprecation notices based on the generated release notes. Double-check that the list of commits here matches your expectations
128-
for the release. You might need to remove incorrect commits or copy/paste commits
129-
from the release branch. Refer to previous releases to confirm the expected format.
130-
131-
17. Un-check the "This is a pre-release" checkbox since you're making a legit for-reals release!
132-
133-
18. Publish the GitHub release once all notes are correct and in order.
134-
135-
19. Edit `releases.md` on the `main` branch, add an entry for the release.
119+
1. Execute the Draft Release Pipeline.
120+
121+
Create a pod template file:
122+
123+
```shell
124+
POD_TEMPLATE=$(mktemp /tmp/pod-template.XXXXXX.yaml)
125+
cat <<'EOF' > $POD_TEMPLATE
126+
securityContext:
127+
fsGroup: 65532
128+
runAsUser: 65532
129+
runAsNonRoot: true
130+
EOF
131+
```
132+
133+
```shell
134+
tkn pipeline start \
135+
--workspace name=shared,volumeClaimTemplateFile="${WORKSPACE_TEMPLATE}" \
136+
--workspace name=credentials,secret=oci-release-secret \
137+
--pod-template "${POD_TEMPLATE}" \
138+
-p package="${TEKTON_PACKAGE}" \
139+
-p git-revision="$PRUNER_RELEASE_GIT_SHA" \
140+
-p release-tag="${PRUNER_VERSION}" \
141+
-p previous-release-tag="${PRUNER_OLD_VERSION}" \
142+
-p release-name="Tekton Pruner" \
143+
-p repo-name="${PRUNER_REPO_NAME}" \
144+
-p bucket="tekton-releases" \
145+
-p rekor-uuid="$REKOR_UUID" \
146+
release-draft-oci
147+
```
148+
149+
1. Watch logs of resulting pipeline run on pipeline `release-draft-oci`
150+
151+
1. On successful completion, a URL will be logged. Visit that URL and look through the release notes.
152+
1. Manually add upgrade and deprecation notices based on the generated release notes
153+
1. Double-check that the list of commits here matches your expectations
154+
for the release. You might need to remove incorrect commits or copy/paste commits
155+
from the release branch. Refer to previous releases to confirm the expected format.
156+
157+
1. Un-check the "This is a pre-release" checkbox since you're making a legit for-reals release!
158+
159+
1. Publish the GitHub release once all notes are correct and in order.
160+
161+
1. Create a branch for the release named `release-<version number>x`, e.g. [`release-v0.3.x`](https://github.com/tektoncd/pruner/tree/release-v0.3.x)
162+
and push it to the repo https://github.com/tektoncd/pruner.
163+
(This can be done on the Github UI.)
164+
Make sure to fetch the commit specified in `PRUNER_RELEASE_GIT_SHA` to create the released branch.
165+
> Background: The reason why we need to create a branch for the release named `release-<version number>x` is for future patch releases. Cherrypicked PRs for the patch release will be merged to this branch. For example, [v0.3.0](https://github.com/tektoncd/pruner/releases/tag/v0.3.0) has been already released, but later on we found that an important PR should have been included to that release. Therefore, we need to do a patch release i.e. v0.3.1 by cherrypicking this PR, which will trigger tekton-robot to create a new PR to merge the changes to the [release-v0.3.x branch](https://github.com/tektoncd/pruner/tree/release-v0.3.x).
166+
167+
1. If the release introduces a new minimum version of Kubernetes required,
168+
edit `README.md` on `main` branch and add the new requirement with in the
169+
"Required Kubernetes Version" section
170+
171+
1. Edit `releases.md` on the `main` branch, add an entry for the release.
136172
- In case of a patch release, replace the latest release with the new one,
137173
including links to docs and examples. Append the new release to the list
138174
of patch releases as well.
139-
- In case of a minor or major release, add a new entry for the
140-
release, including links to docs and examples
175+
- In case of a minor or major release, add a new entry for the
176+
release, including links to docs and example
141177
- Check if any release is EOL, if so move it to the "End of Life Releases"
142178
section
143179
144-
20. Push & make PR for updated `releases.md`
180+
1. Push & make PR for updated `releases.md` and `README.md`
145181
146-
21. Test release that you just made against your own cluster (note `--context my-dev-cluster`):
182+
1. Test release that you just made against your own cluster (note `--context my-dev-cluster`):
147183
148184
```bash
149185
# Test latest
@@ -152,13 +188,13 @@ from the release branch. Refer to previous releases to confirm the expected form
152188
153189
```bash
154190
# Test backport
155-
kubectl --context my-dev-cluster apply --filename https://infra.tekton.dev/tekton-releases/pruner/previous/v0.12.1/release.yaml
191+
kubectl --context my-dev-cluster apply --filename https://infra.tekton.dev/tekton-releases/pruner/previous/v0.3.4/release.yaml
156192
```
157193
158-
22. For major releases, update the [website sync configuration](https://github.com/tektoncd/website/blob/main/sync/config/pruner.yaml)
194+
1. For major releases, update the [website sync configuration](https://github.com/tektoncd/website/blob/main/sync/config/pruner.yaml)
159195
to include the new release.
160196
161-
23. Announce the release in Slack channels #general, #pruner and #announcements.
197+
1. Announce the release in Slack channels #general, #announcements and #pruner.
162198
163199
Congratulations, you're done!
164200
@@ -167,19 +203,58 @@ Congratulations, you're done!
167203
1. Configure `kubectl` to connect to
168204
[the dogfooding cluster](https://github.com/tektoncd/plumbing/blob/main/docs/dogfooding.md):
169205
206+
The dogfooding cluster is currently an OKE cluster in oracle cloud. we need the Oracle Cloud CLI client. Install oracle cloud cli (https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/cliinstall.htm)
207+
170208
```bash
171209
oci ce cluster create-kubeconfig --cluster-id <CLUSTER-OCID> --file $HOME/.kube/config --region <CLUSTER-REGION> --token-version 2.0.0 --kube-endpoint PUBLIC_ENDPOINT
172210
```
173211
174-
2. Give [the context](https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/)
212+
1. Give [the context](https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/)
175213
a short memorable name such as `dogfooding`:
176214
177215
```bash
178-
kubectl config rename-context <REPLACE-WITH-NAME-FROM-CONFIG-CONTEXT> dogfooding
216+
kubectl config current-context
179217
```
218+
get the context name and replace with current_context_name
180219
181-
## Important: Switch `kubectl` back to your own cluster by default.
220+
```bash
221+
kubectl config rename-context <current_context_name> dogfooding
222+
```
182223
183-
```bash
184-
kubectl config use-context my-dev-cluster
224+
1. **Important: Switch `kubectl` back to your own cluster by default.**
225+
226+
```bash
227+
kubectl config use-context my-dev-cluster
228+
```
229+
230+
## Cherry-picking commits for patch releases
231+
232+
The easiest way to cherry-pick a commit into a release branch is to use the "cherrypicker" plugin (see https://prow.tekton.dev/plugins for documentation).
233+
To use the plugin, comment "/cherry-pick <branch-to-cherry-pick-onto>" on the pull request containing the commits that need to be cherry-picked.
234+
Make sure this command is on its own line, and use one comment per branch that you're cherry-picking onto.
235+
Automation will create a pull request cherry-picking the commits into the named branch, e.g. `release-v0.3.x`.
236+
237+
The cherrypicker plugin isn't able to resolve merge conflicts. If there are merge conflicts, you'll have to manually cherry-pick following these steps:
238+
1. Fetch the branch you're backporting to and check it out:
239+
```sh
240+
git fetch upstream <branchname>
241+
git checkout upstream/<branchname>
242+
```
243+
1. (Optional) Rename the local branch to make it easier to work with:
244+
```sh
245+
git switch -c <new-name-for-local-branch>
246+
```
247+
1. Find the 40-character commit hash to cherry-pick. Note: automation creates a new commit when merging contributors' commits into main.
248+
You'll need to use the hash of the commit created by tekton-robot.
249+
250+
1. [Cherry-pick](https://git-scm.com/docs/git-cherry-pick) the commit onto the branch:
251+
```sh
252+
git cherry-pick <commit-hash>
253+
```
254+
1. Resolve any merge conflicts.
255+
1. Finish the cherry-pick:
256+
```sh
257+
git add <changed-files>
258+
git cherry-pick --continue
185259
```
260+
1. Push your changes to your fork and open a pull request against the upstream branch.

0 commit comments

Comments
 (0)