Skip to content

Instantly share code, notes, and snippets.

@jcvenegas
Last active March 27, 2019 18:14
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save jcvenegas/2f615e61bdb576761b12423b8195ae14 to your computer and use it in GitHub Desktop.
Save jcvenegas/2f615e61bdb576761b12423b8195ae14 to your computer and use it in GitHub Desktop.
Kata Containers Release

How to do a Kata Containers Release

Hi if you are reading this document you may also want to create a kata Containers Release.

The Kata Containers Release Process is defined in the follwoing documents.

https://github.com/kata-containers/documentation/blob/master/Releases.md

To simply the process of read each release we have created a checklist for it.

https://github.com/kata-containers/documentation/blob/master/Release-Checklist.md

In order to simplify the process of do the Release Checklist we have semi-automated most of the process.

So lets get started.

Requeriments

Get packaging kata repository.

go get -d github.com/kata-containers/packaging

Start release process

cd ${GOPATH}/src/github.com/kata-containers/packaging
#make sure you are up-to-date.
git pull
  1. Bump repositories
cd ${GOPATH}/src/github.com/kata-containers/packaging/release
export NEW_VERSION=X.Y.Z
export BRANCH="master"
./update-repository-version.sh -p ksm-throttler "$NEW_VERSION" "$BRANCH"
./update-repository-version.sh -p proxy "$NEW_VERSION" "$BRANCH"
./update-repository-version.sh -p shim "$NEW_VERSION" "$BRANCH"
./update-repository-version.sh -p runtime "$NEW_VERSION" "$BRANCH"
./update-repository-version.sh -p osbuilder "$NEW_VERSION" "$BRANCH"
./update-repository-version.sh -p agent "$NEW_VERSION" "$BRANCH"

The commands from above will create a github pull request in the Kata projects. Work with the Kata approvers to verify that the CI works and the PR are merged.

  1. Create Github tags

After all the PRs from the previous step were done, its time to create github tags.

cd ${GOPATH}/src/github.com/kata-containers/packaging/release
 ./tag_repos.sh -p -b "$BRANCH" tag

This wil create tags for all the Kata Repos.

  1. Create Kata Containers Image and upload to Github.
cd ${GOPATH}/src/github.com/kata-containers/packaging/release
./publish-kata-image.sh -p ${NEW_VERSION}
  1. Create Kata static binaries tarball and upload to github.
cd ${GOPATH}/src/github.com/kata-containers/packaging/release

./kata-deploy-binaries.sh -p ${NEW_VERSION}
  1. Create Kata packages.
cd ${GOPATH}/src/github.com/kata-containers/packaging/obs-packaging
#./create-pkg-branch.sh ${BRANCH}
./gen_versions_txt.sh ${BRANCH}
PUSH=1 OBS_SUBPROJECT="releases:$(uname -m):${BRANCH}" ./build_from_docker.sh ${NEW_VERSION}
  1. Create release notes.
cd ${GOPATH}/src/github.com/kata-containers/packaging/release
./runtime-release-notes.sh 1.2.0 1.2.1 > notes.md

Add release notes in github runtime.

  1. Announce release.

Publish in Slack and ML that new release is ready.

  1. Finish You did it!
@bergwolf
Copy link

A minor issue in tag_repos.sh:

diff --git a/release/tag_repos.sh b/release/tag_repos.sh
index c85d615..0661899 100755
--- a/release/tag_repos.sh
+++ b/release/tag_repos.sh
@@ -145,7 +145,7 @@ create_github_release() {
        tag=${2:-}
        [ -d "${repo_dir}" ] || die "No repository directory"
        [ -n "${tag}" ] || die "No repository directory"
-       if ! "${hub_bin}" release | grep "${tag}"; then
+       if ! "${hub_bin}"  -C "${repo_dir}" release | grep "${tag}$"; then
                info "Creating Github release"
                "${hub_bin}" -C "${repo_dir}" release create -m "${PROJECT} ${tag}" "${tag}"
        else

@bergwolf
Copy link

Another issue I noticed is that we are not marking the -rc releases as prerelease on github. I've fixed it the github releases but we need to fix tag_repos.sh as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment