Skip to content

Commit 51fdb5d

Browse files
committed
Add a tool to generate the release name
Signed-off-by: Andrea Frittoli <[email protected]>
1 parent 5b082b1 commit 51fdb5d

File tree

1 file changed

+37
-23
lines changed

1 file changed

+37
-23
lines changed

tekton/release-cheat-sheet.md

+37-23
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,54 @@ the pipelines repo, a terminal window and a text editor.
1212

1313
1. [Install kustomize](https://kubectl.docs.kubernetes.io/installation/kustomize) if you haven't already.
1414

15-
1. Ensure the correct version of the release pipeline is installed on the cluster:
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.47.x`](https://github.com/tektoncd/pipeline/tree/release-v0.47.x) if you are patching a release i.e. `v0.47.2`.
18+
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
1621

1722
```bash
1823
kustomize build tekton | kubectl --context dogfooding replace -f -
1924
```
2025

21-
1. Create environment variables for bash scripts in later steps.
26+
1. Choose a name for the new release! The usual pattern is "< cat breed > < famous robot >" e.g. "Ragdoll Norby". For LTS releases, add a suffix "LTS" in the name such as "< cat breed > < famous robot > LTS" e.g. "Ragdoll Norby LTS". Use this command to generate a name that has not yet been used:
2227

2328
```bash
24-
TEKTON_VERSION=# Example: v0.21.0
29+
go run tekton/release_names.go
30+
```
31+
32+
It returns something like:
33+
34+
```json
35+
{
36+
"release_name": "Khao Manee KARR",
37+
"cat_breed_url": "https://en.wikipedia.org/wiki/Khao_Manee",
38+
"robot_url": "https://en.wikipedia.org/wiki/KARR"
39+
}
40+
```
41+
42+
The URLs can be used to find out more about the cat breed and robot selected by the tool.
43+
Previous release names can also be found with the following command:
44+
45+
```bash
46+
curl \
47+
-H "Accept: application/vnd.github.v3+json" \
48+
https://api.github.com/repos/tektoncd/pipeline/releases\?per_page=100 \
49+
| jq ".[].name" | cut -d'"' -f 3 | tr -d '\' | sort -u
2550
```
2651

27-
- Select the commit you would like to build the release from (NOTE: the commit is full (40-digit) hash.)
28-
- 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`
29-
- Select the most recent commit on the ***`release-<version number>x` branch***, e.g. [`release-v0.47.x`](https://github.com/tektoncd/pipeline/tree/release-v0.47.x) if you are patching a release i.e. `v0.47.2`.
52+
1. Create a `release.env` file with environment variables for bash scripts in later steps, and source it:
3053

3154
```bash
32-
TEKTON_RELEASE_GIT_SHA=# SHA of the release to be released
55+
cat <<EOF > release.env
56+
TEKTON_VERSION= # Example: v0.69.0
57+
TEKTON_RELEASE_GIT_SHA= # SHA of the release to be released, e.g. 5b082b1106753e093593d12152c82e1c4b0f37e5
58+
TEKTON_OLD_VERSION= # Example: v0.68.0
59+
TEKTON_RELEASE_NAME="Oriental Longhair Omnibot" # Name of the release
60+
TEKTON_PACKAGE=tektoncd/pipeline
61+
EOF
62+
. ./release.env
3363
```
3464
3565
1. Confirm commit SHA matches what you want to release.
@@ -103,15 +133,6 @@ the pipelines repo, a terminal window and a text editor.
103133
104134
1. The YAMLs are now released! Anyone installing Tekton Pipelines will get the new version. Time to create a new GitHub release announcement:
105135
106-
1. Choose a name for the new release! The usual pattern is "< cat breed > < famous robot >" e.g. "Ragdoll Norby". For LTS releases, add a suffix "LTS" in the name such as "< cat breed > < famous robot > LTS" e.g. "Ragdoll Norby LTS". Browse [the releases page](https://github.com/tektoncd/pipeline/releases) or run this command to check which names have already been used:
107-
108-
```bash
109-
curl \
110-
-H "Accept: application/vnd.github.v3+json" \
111-
https://api.github.com/repos/tektoncd/pipeline/releases\?per_page=100 \
112-
| jq ".[].name"
113-
```
114-
115136
1. Find the Rekor UUID for the release
116137
117138
```bash
@@ -121,13 +142,6 @@ the pipelines repo, a terminal window and a text editor.
121142
echo -e "CONTROLLER_IMAGE_SHA: ${CONTROLLER_IMAGE_SHA}\nREKOR_UUID: ${REKOR_UUID}"
122143
```
123144
124-
1. Create additional environment variables
125-
126-
```bash
127-
TEKTON_OLD_VERSION=# Example: v0.11.1
128-
TEKTON_RELEASE_NAME=# The release name you just chose, e.g.: "Ragdoll Norby"
129-
```
130-
131145
1. Execute the Draft Release Pipeline.
132146
133147
```bash

0 commit comments

Comments
 (0)