title | label |
---|---|
Kyma CLI release process |
internal |
This document describes how to create a Kyma CLI release.
A Kyma CLI release consists of:
- GitHub release with automated changelog generation
- Artifacts, including
cli
binaries and source code archives - A release tag or branch holding the code
-
After Kyma is released, create a release branch in the
cli
repository. The name of this branch must follow therelease-x.y
pattern, such asrelease-2.4
.NOTE: This step applies only to new major and minor versions.
git fetch upstream git checkout --no-track -b {RELEASE_NAME} upstream/main git push upstream {RELEASE_NAME}
-
Check the
internal/config/config.go
file from thecli
repository on the release branch:- The
DefaultKyma2Version
variable must contain the latest Kyma2.x.x
version. - Run
make docs
to update the CLI help accordingly.
- The
-
Create a PR to
cli/release-x.y
that triggers the presubmit job forcli
. -
After merging the PR, create a tag on the release branch that has the value of the new
cli
release version. If you define a release candidate version, a pre-release is created.git tag -a {RELEASE_VERSION} -m "Release {RELEASE_VERSION}"
Replace {RELEASE_VERSION} with the new
cli
release version, for example,2.0.0-rc1
,2.0.0-rc2
or2.0.0
. -
Create the new version.
-
Push the tag to trigger a postsubmit job that creates the GitHub release. Check whether the release is available under releases.
git push upstream {RELEASE_VERSION}
-
Verify the Prow Status of the matching revision ({RELEASE_VERSION}).
-
If the postsubmit job failed, you can re-trigger it by removing the tag from upstream and pushing it again.
git push --delete upstream {RELEASE_VERSION} git push upstream {RELEASE_VERSION}
-
-
After the release tarball is available on Github, update the Homebrew formula, either automatically or manually:
-
If no changes to the build command are needed, this can be done automatically by the Homebrew CLI:
brew bump-formula-pr --strict kyma-cli --url https://github.com/kyma-project/cli/archive/{RELEASE_VERSION}.tar.gz
It creates a PR to Homebrew/homebrew-core that contains the version update changes to the kyma-cli formula. If all checks in this PR are passed, the rest is handled by Homebrew maintainers. If some tests fail, identify the root cause. If it's not due to bugs, simply close your PR and re-run the previous
brew bump-formula-pr
command with--force
mode.- If you got the message
fatal: a branch named 'bump-kyma-cli-{RELEASE_VERSION}' already exists
, delete this local branch. - If you got the message
Error: You need to bump this formula manually since the new URL and old URL are both: https://github.com/kyma-project/cli/archive/{RELEASE_VERSION}.tar.gz
, restore the change in you local repo. The local repo is under/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core
(Intel) or/opt/homebrew/Library/Taps/homebrew/homebrew-core
(Apple Silicon).
- If you got the message
-
Alternatively, create a PR to the kyma-cli Homebrew formula.
When a Homebrew maintainer approves your PR, the formula is updated.
-
-
Verify a day later that the chocolatey formula has been updated: https://community.chocolatey.org/packages/kyma-cli