Release Process
Change milestone
- Create a new GitHub milestone for the next release
- Change milestone applier so new changes can be applied to the appropriate release
- Open a PR in https://github.com/kubernetes/test-infra to change this line
- Example PR: https://github.com/kubernetes/test-infra/pull/16827
- Open a PR in https://github.com/kubernetes/test-infra to change this line
Prepare branch
TODO
Prepare branch, tag and release notes
-
Update the file
metadata.yamlif is a major or minor release -
Submit a PR for the
metadata.yamlupdate if needed, wait for it to be merged before continuing, and pull any changes prior to continuing. -
Create and push the release tags to the GitHub repository:
# Export the tag of the release to be cut, e.g.:
export RELEASE_TAG=v1.11.0-beta.0
# Create tags locally
git tag -s -a ${RELEASE_TAG} -m ${RELEASE_TAG}
# Push tags
# Note: `upstream` must be the remote pointing to `github.com/kubernetes-sigs/cluster-api-provider-gcp`.
git push upstream ${RELEASE_TAG}
Notes:
-screates a signed tag, you must have a GPG key added to your GitHub account- This will automatically trigger a ProwJob to publish images to the staging image repository.
- Configure gcloud authentication:
- `glcoud auth login
-
make releasefrom repo, this will create the release artifacts in theout/folder -
Install the
release-notestool according to instructions -
Generate release-notes (require’s exported
GITHUB_TOKENvariable):
Run the release-notes tool with the appropriate commits. Commits range from the first commit after the previous release to the new release commit.
release-notes --org kubernetes-sigs --repo cluster-api-provider-gcp \
--start-sha 1cf1ec4a1effd9340fe7370ab45b173a4979dc8f \
--end-sha e843409f896981185ca31d6b4a4c939f27d975de
--branch <RELEASE_BRANCH_OR_MAIN_BRANCH>
- Manually format and categorize the release notes
Prepare release in GitHub
Create the GitHub release in the UI
- Create a draft release with the output from above in GitHub and associate it with the tag that was created
- Copy paste the release notes
- Upload artifacts from the
out/folder
Promote image to prod repo
Images are built by the push images job after pushing a tag.
To promote images from the staging repository to the production registry (registry.k8s.io/cluster-api-provider-gcp):
-
Wait until images for the tag have been built and pushed to the staging repository by the push images job.
-
If you don’t have a GitHub token, create one by going to your GitHub settings in Personal access tokens. Make sure you give the token the
reposcope. -
Create a PR to promote the images to the production registry:
# Export the tag of the release to be cut, e.g.: export RELEASE_TAG=v1.11.0-beta.0 export GITHUB_TOKEN=<your GH token> make promote-imagesNotes:
make promote-imagestarget tries to figure out your Github user handle in order to find the forked k8s.io repository. If you have not forked the repo, please do it before running the Makefile target.- if
make promote-imagesfails with an error likeFATAL while checking fork of kubernetes/k8s.ioyou may be able to solve it by manually setting the USER_FORK variable i.e.export USER_FORK=<personal GitHub handle>. kpromousesgit@github.com:...as remote to push the branch for the PR. If you don’t havesshset up you can configure git to usehttpsinstead viagit config --global url."https://github.com/".insteadOf git@github.com:.- This will automatically create a PR in k8s.io and assign the CAPV maintainers.
-
Merge the PR (/lgtm + /hold cancel) and verify the images are available in the production registry:
- Wait for the promotion prow job to complete successfully. Then verify that the production images are accessible:
docker pull registry.k8s.io/cluster-api-provider-gcp/cluster-api-gcp-controller:${RELEASE_TAG}
Example PR: https://github.com/kubernetes/k8s.io/pull/1462
Location of image: https://console.cloud.google.com/gcr/images/k8s-staging-cluster-api-gcp/GLOBAL/cluster-api-gcp-controller?rImageListsize=30
Release in GitHub
Create the GitHub release in the UI
- Create a draft release in GitHub and associate it with the tag that was created
- Copy paste the release notes
- Upload artifacts from the
out/folder - Publish release
- Announce the release
Versioning
cluster-api-provider-gcp follows the semantic versioning specification.
Example versions:
- Pre-release:
v0.1.1-alpha.1 - Minor release:
v0.1.0 - Patch release:
v0.1.1 - Major release:
v1.0.0
Expected artifacts
- A release yaml file
infrastructure-components.yamlcontaining the resources needed to deploy to Kubernetes - A
cluster-templates.yamlfor each supported flavor - A
metadata.yamlwhich maps release series to cluster-api contract version - Release notes
Communication
Patch Releases
- Announce the release in Kubernetes Slack on the #cluster-api-gcp channel.
Minor/Major Releases
- Follow the communications process for pre-releases
- An announcement email is sent to
kubernetes-sig-cluster-lifecycle@googlegroups.comwith the subject[ANNOUNCE] cluster-api-provider-gcp <version> has been released