Skip to content

Commit 6ae2d5a

Browse files
mbpavanvdemeester
authored andcommitted
fix issues with release cheatsheet
1 parent 811a04d commit 6ae2d5a

1 file changed

Lines changed: 62 additions & 57 deletions

File tree

‎tekton/release-cheat-sheet.md‎

Lines changed: 62 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -71,46 +71,46 @@ need a checkout of the operator repo, a terminal window and a text editor.
7171

7272
2. `cd` to root of Operator git checkout.
7373

74-
1. Create a `release.env` file with environment variables for bash scripts in later steps, and source it:
74+
3. Create a `release.env` file with environment variables for bash scripts in later steps, and source it:
7575

7676
```bash
7777
cat <<EOF > release.env
7878
TEKTON_RELEASE_VERSION= # Example: v0.69.0
7979
TEKTON_OLD_VERSION= # Example: v0.68.0
80-
TEKTON_RELEASE_NAME="Oriental Longhair Omnibot" # Name of the release
80+
TEKTON_RELEASE_NAME="Oriental Longhair Omnibot" # Name of the release (should be a bird name)
8181
TEKTON_PACKAGE=tektoncd/operator
8282
TEKTON_REPO_NAME=operator
8383
EOF
8484
. ./release.env
8585
```
8686
8787
88-
3. set commit SHA from TEKTON_RELEASE_BRANCH
88+
4. Set commit SHA from TEKTON_RELEASE_BRANCH:
8989
```bash
9090
TEKTON_RELEASE_GIT_SHA=$(git rev-parse upstream/${TEKTON_RELEASE_BRANCH})
9191
```
9292
93-
4. Confirm commit SHA matches what you want to release.
93+
5. Confirm commit SHA matches what you want to release.
9494
9595
```bash
9696
git show $TEKTON_RELEASE_GIT_SHA
9797
```
9898
99-
1. Create a workspace template file:
99+
6. Create a workspace template file:
100100
101101
```bash
102102
WORKSPACE_TEMPLATE=$(mktemp /tmp/workspace-template.XXXXXX.yaml)
103103
cat <<'EOF' > $WORKSPACE_TEMPLATE
104-
spec:
105-
accessModes:
106-
- ReadWriteOnce
107-
resources:
108-
requests:
109-
storage: 1Gi
110-
EOF
104+
spec:
105+
accessModes:
106+
- ReadWriteOnce
107+
resources:
108+
requests:
109+
storage: 1Gi
110+
EOF
111111
```
112112
113-
1. Execute the release pipeline (takes ~45 mins).
113+
7. Execute the release pipeline (takes ~45 mins).
114114
115115
**The minimum required tkn version is v0.30.0 or later**
116116
@@ -164,54 +164,56 @@ EOF
164164
165165
1. The YAMLs are now released. Anyone installing Tekton Operator will now get the new version. Time to create a new GitHub release announcement:
166166
167-
1. Find the Rekor UUID for the release
167+
1. Find the Rekor UUID for the release:
168168
169-
```bash
170-
RELEASE_FILE=https://infra.tekton.dev/tekton-releases/pipeline/previous/${TEKTON_VERSION}/release.yaml
171-
CONTROLLER_IMAGE_SHA=$(curl -L $RELEASE_FILE | sed -n 's/"//g;s/.*ghcr\.io.*controller.*@//p;')
172-
REKOR_UUID=$(rekor-cli search --sha $CONTROLLER_IMAGE_SHA | grep -v Found | head -1)
173-
echo -e "CONTROLLER_IMAGE_SHA: ${CONTROLLER_IMAGE_SHA}\nREKOR_UUID: ${REKOR_UUID}"
174-
```
169+
```bash
170+
RELEASE_FILE=https://infra.tekton.dev/tekton-releases/operator/previous/${TEKTON_VERSION}/release.yaml
171+
CONTROLLER_IMAGE_SHA=$(curl -L $RELEASE_FILE | sed -n 's/"//g;s/.*ghcr\.io.*controller.*@//p;')
172+
REKOR_UUID=$(rekor-cli search --sha $CONTROLLER_IMAGE_SHA | grep -v Found | head -1)
173+
echo -e "CONTROLLER_IMAGE_SHA: ${CONTROLLER_IMAGE_SHA}\nREKOR_UUID: ${REKOR_UUID}"
174+
```
175175
176-
1. Execute the Draft Release Pipeline.
176+
2. Execute the Draft Release Pipeline.
177177
178178
Create a pod template file:
179179
180180
```shell
181181
POD_TEMPLATE=$(mktemp /tmp/pod-template.XXXXXX.yaml)
182182
cat <<'EOF' > $POD_TEMPLATE
183-
securityContext:
184-
fsGroup: 65532
185-
runAsUser: 65532
186-
runAsNonRoot: true
187-
EOF
183+
securityContext:
184+
fsGroup: 65532
185+
runAsUser: 65532
186+
runAsNonRoot: true
187+
EOF
188188
```
189-
```bash
190-
tkn --context dogfooding pipeline start \
191-
--workspace name=shared,volumeClaimTemplateFile="${WORKSPACE_TEMPLATE} \
192-
--workspace name=credentials,secret=oci-release-secret \
193-
--pod-template "{POD_TEMPLATE}" \
194-
-p package="{TEKTON_PACKAGE}" \
195-
-p git-revision="${TEKTON_RELEASE_GIT_SHA}" \
196-
-p release-tag="${TEKTON_RELEASE_VERSION}" \
197-
-p previous-release-tag="${TEKTON_OLD_VERSION}" \
198-
-p release-name="${TEKTON_RELEASE_NAME}" \
199-
-p repo-name="${TEKTON_REPO_NAME}" \
200-
-p bucket="tekton-releases/operator/" \
201-
-p rekor-uuid="REKOR_UUID" \
202-
release-draft-oci
203-
```
204189
205-
1. Watch logs of create-draft-release
190+
```bash
191+
tkn --context dogfooding pipeline start \
192+
--workspace name=shared,volumeClaimTemplateFile="${WORKSPACE_TEMPLATE}" \
193+
--workspace name=credentials,secret=oci-release-secret \
194+
--pod-template "${POD_TEMPLATE}" \
195+
-p package="${TEKTON_PACKAGE}" \
196+
-p git-revision="${TEKTON_RELEASE_GIT_SHA}" \
197+
-p release-tag="${TEKTON_RELEASE_VERSION}" \
198+
-p previous-release-tag="${TEKTON_OLD_VERSION}" \
199+
-p release-name="${TEKTON_RELEASE_NAME}" \
200+
-p repo-name="${TEKTON_REPO_NAME}" \
201+
-p bucket="tekton-releases" \
202+
-p rekor-uuid="${REKOR_UUID}" \
203+
release-draft-oci
204+
```
205+
206+
3. Watch logs of create-draft-release
207+
208+
4. On successful completion, a 👉 URL will be logged. Visit that URL and look through the release notes.
209+
210+
5. Manually add upgrade and deprecation notices based on the generated release notes.
206211
207-
1. On successful completion, a 👉 URL will be logged. Visit that URL and look through the release notes. 1. Manually
208-
add upgrade and deprecation notices based on the generated release notes 1. Double-check that the list of commits
209-
here matches your expectations for the release. You might need to remove incorrect commits or copy/paste commits
210-
from the release branch. Refer to previous releases to confirm the expected format.
212+
6. Double-check that the list of commits here matches your expectations for the release. You might need to remove incorrect commits or copy/paste commits from the release branch. Refer to previous releases to confirm the expected format.
211213
212-
1. Un-check the "This is a pre-release" checkbox since you're making a legit for-reals release!
214+
7. Un-check the "This is a pre-release" checkbox since you're making a legit for-reals release!
213215
214-
1. Publish the GitHub release once all notes are correct and in order.
216+
8. Publish the GitHub release once all notes are correct and in order.
215217
216218
2. Edit `README.md` on `master` branch, add entry to docs table with latest release links.
217219
In README.md, update the supported versions and end-of-life sections:
@@ -243,26 +245,29 @@ Congratulations, you're done!
243245
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
244246
```
245247
246-
1. Give [the context](https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/)
248+
2. Give [the context](https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/)
247249
a short memorable name such as `dogfooding`:
248250
249251
```bash
250252
kubectl config rename-context <REPLACE-WITH-NAME-FROM-CONFIG-CONTEXT> dogfooding
251253
```
252254
253-
1. **Important: Switch `kubectl` back to your own cluster by default.**
255+
3. **Important: Switch `kubectl` back to your own cluster by default.**
254256
255257
```bash
256258
kubectl config use-context my-dev-cluster
257259
```
258260
259261
## Ensure documentation is updated
260-
In the https://github.com/tektoncd/website.git repository, under sync/config/operator.yaml,
261-
ensure that you add a section for the new ${TEKTON_RELEASE_VERSION} version.
262+
263+
In the https://github.com/tektoncd/website.git repository, under sync/config/operator.yaml,
264+
ensure that you add a section for the new ${TEKTON_RELEASE_VERSION} version.
262265
263266
## Add operator to operatorhub
264-
This process is typically done for minor releases, but not for patch releases.
265-
1. Under the https://github.com/k8s-operatorhub/community-operators.git repository, follow these instructions:
266-
2. Walk through the file /operatorhub/kubernetes/README.md to generate the bundle.
267-
3. Copy the bundle generated to your local community-operators repository.
268-
4. After completing the steps to generate and copy the bundle, create a pull request against the community-operators repository
267+
268+
This process is typically done for minor releases, but not for patch releases.
269+
270+
1. Under the https://github.com/k8s-operatorhub/community-operators.git repository, follow these instructions:
271+
2. Walk through the file /operatorhub/kubernetes/README.md to generate the bundle.
272+
3. Copy the bundle generated to your local community-operators repository.
273+
4. After completing the steps to generate and copy the bundle, create a pull request against the community-operators repository

0 commit comments

Comments
 (0)