These steps provide a no-frills guide to performing an official release of Tekton Operator. To follow these steps you'll need a checkout of the operator repo, a terminal window and a text editor.
- tektoncd/operator repository is cloned locally and a remote with name
tektoncd
points togithub.com/tektoncd/operator
repository.
-
Select the commit you would like to build the release from, most likely the most recent commit at https://github.com/tektoncd/operator/commits/main and note the commit's hash.
-
Define the version of the operator. At present, for each release we increment the minor version of operator. For more details, refer Tektoncd Operator Release. eg:
0.62.0
or0.62.1
(patch release)Set the version in a variable.
TEKTON_RELEASE_VERSION=v0.62.0
-
Set the release branch name
minor version release vs patch release:
- If this is a new minor version release create a new branch from either the head of
#main
branch if the commit identified in step1.
TEKTON_RELEASE_BRANCH=release-v0.62.x git checkout -b ${TEKTON_RELEASE_BRANCH}
- If this is a patch release make sure that the correct branch is checkout. eg: If we are making release
v0.62.1, then make sure the
release-v0.62.x
is checked out.
- If this is a new minor version release create a new branch from either the head of
-
Make sure the Tektoncd Component versions are the one you want, in
components.yaml
. Those are kept up-to-date by our bots, but just in case. -
minor version release vs patch release:
- if this is a minor version release push the branch to
github.com/tektoncd/operator
git push tektoncd ${TEKTON_RELEASE_BRANCH}
- if this is a patch release, make a pull request to the appropriate minor version release branch (eg: release-v0.62.x) and get it merged before continuing to the next section.
- if this is a minor version release push the branch to
- Setup a context to connect to the dogfooding cluster if you haven't already.
2cd
to root of Operator git checkout.
-
Confirm commit SHA matches what you want to release.
git show $TEKTON_RELEASE_GIT_SHA
-
Create a workspace template file:
cat <<EOF > workspace-template.yaml spec: accessModes: - ReadWriteOnce resources: requests: storage: 1Gi EOF
-
Execute the release pipeline.
tkn --context dogfooding pipeline start operator-release \ --filename=tekton/operator-release-pipeline.yaml \ --serviceaccount=release-right-meow \ --param package=github.com/tektoncd/operator \ --param components=components.yaml \ --param gitRevision="${TEKTON_RELEASE_GIT_SHA}" \ --param imageRegistry=ghcr.io \ --param imageRegistryPath=tektoncd/operator \ --param imageRegistryRegions="" \ --param imageRegistryUser=tekton-robot \ --param serviceAccountPath=release.json \ --param serviceAccountImagesPath=credentials \ --param versionTag="${TEKTON_RELEASE_VERSION}" \ --param releaseBucket=gs://tekton-releases/operator \ --param koExtraArgs="" \ --param releaseAsLatest=true \ --param platforms=linux/amd64,linux/arm64,linux/s390x,linux/ppc64le \ --param kubeDistros="kubernetes openshift" \ --workspace name=release-secret,secret=release-secret \ --workspace name=release-images-secret,secret=ghcr-creds \ --workspace name=workarea,volumeClaimTemplateFile=workspace-template.yaml \ --pipeline-timeout 2h0m0s
-
Watch logs of resulting PipelineRun.
-
Once the pipeline is complete, check its results:
tkn pr describe <pipeline-run-name> (...) 📝 Results NAME VALUE ∙ commit-sha ff6d7abebde12460aecd061ab0f6fd21053ba8a7 ∙ release-file https://storage.googleapis.com/tekton-releases/operator/previous/v20210223-xyzxyz/release.yaml ∙ release-file-no-tag https://storage.googleapis.com/tekton-releases/operator/previous/v20210223-xyzxyz/release.notag.yaml (...)
The
commit-sha
should match$TEKTON_RELEASE_GIT_SHA
. The two URLs can be opened in the browser or viacurl
to download the release manifests.
-
The YAMLs are now uploaded to publically accesible gcs bucket! Anyone installing Tekton Pipelines will now get the new version. Time to create a new GitHub release announcement:
- Create additional environment variables
TEKTON_OLD_VERSION=# Example: v0.11.1 TEKTON_RELEASE_NAME=# The release name you just chose, e.g.: "Ragdoll Norby"
- Execute the Draft Release Pipeline.
tkn --context dogfooding pipeline start \ --workspace name=shared,volumeClaimTemplateFile=workspace-template.yaml \ --workspace name=credentials,secret=release-secret \ -p package="tektoncd/operator" \ -p git-revision="$TEKTON_RELEASE_GIT_SHA" \ -p release-tag="${TEKTON_RELEASE_VERSION}" \ -p previous-release-tag="${TEKTON_OLD_VERSION}" \ -p release-name="" \ -p bucket="gs://tekton-releases/operator" \ -p rekor-uuid="" \ release-draft
-
Watch logs of create-draft-release
-
On successful completion, a 👉 URL will be logged. Visit that URL and look through the release notes. 1. Manually add upgrade and deprecation notices based on the generated release notes 1. 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.
-
Un-check the "This is a pre-release" checkbox since you're making a legit for-reals release!
-
Publish the GitHub release once all notes are correct and in order.
-
Edit
README.md
onmaster
branch, add entry to docs table with latest release links. -
Push & make PR for updated
README.md
-
Test release that you just made against your own cluster (note
--context my-dev-cluster
):# Test latest kubectl --context my-dev-cluster apply --filename https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml
-
Announce the release in Slack channels #general and #pipelines.
Congratulations, you're done!
-
Configure
kubectl
to connect to the dogfooding cluster:gcloud container clusters get-credentials dogfooding --zone us-central1-a --project tekton-releases
-
Give the context a short memorable name such as
dogfooding
:kubectl config rename-context gke_tekton-releases_us-central1-a_dogfooding dogfooding
-
Important: Switch
kubectl
back to your own cluster by default.kubectl config use-context my-dev-cluster