From 017c7cf249469770351355b6567b2ec6ccc2b0fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Tue, 6 Apr 2021 15:33:49 +0000 Subject: [PATCH 1/3] release: Use sudo to install hub MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This doesn't make much difference for the automated process we have in place, but makes a whole lot of difference for those trying to have the binaries deployed locally. Signed-off-by: Fabiano FidĂȘncio (cherry picked from commit c2197cbf2b5f1f2293b6e50f76710f811445f868) --- tools/packaging/release/kata-deploy-binaries.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/packaging/release/kata-deploy-binaries.sh b/tools/packaging/release/kata-deploy-binaries.sh index a7f2b97a50..26909c6ca9 100755 --- a/tools/packaging/release/kata-deploy-binaries.sh +++ b/tools/packaging/release/kata-deploy-binaries.sh @@ -81,7 +81,7 @@ verify_hub() { go get -d ${hub_repo} || true pushd ${GOPATH}/src/${hub_repo} make - make install prefix=/usr/local + sudo -E make install prefix=/usr/local popd fi } From 144be14547d9831036815534e91b99cda16cc672 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Tue, 6 Apr 2021 10:06:07 +0000 Subject: [PATCH 2/3] release: Get rid of "master" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We don't use the "master" branch for anything in `kata-containers/kata-containers`. Signed-off-by: Fabiano FidĂȘncio (cherry picked from commit ca4dccf98013eebaaced6ba2a706000159e51281) --- tools/packaging/release/Makefile | 2 +- tools/packaging/release/tag_repos.sh | 6 +++--- tools/packaging/release/update-repository-version_test.sh | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/packaging/release/Makefile b/tools/packaging/release/Makefile index f98d837f46..0053fa8ea7 100644 --- a/tools/packaging/release/Makefile +++ b/tools/packaging/release/Makefile @@ -9,7 +9,7 @@ MK_DIR :=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) .PHONY: bump-kata-version NEW_VERSION := -TARGET_BRANCH ?= "master" +TARGET_BRANCH ?= "main" # Run update-repository-version.sh # $1 : repository to bump diff --git a/tools/packaging/release/tag_repos.sh b/tools/packaging/release/tag_repos.sh index 1e51dbd2a4..4d6f3f5c4e 100755 --- a/tools/packaging/release/tag_repos.sh +++ b/tools/packaging/release/tag_repos.sh @@ -15,7 +15,7 @@ script_name="$(basename "${BASH_SOURCE[0]}")" OWNER=${OWNER:-"kata-containers"} PROJECT="Kata Containers" PUSH="${PUSH:-"false"}" -branch="master" +branch="main" readonly URL_RAW_FILE="https://raw.githubusercontent.com/${OWNER}" #The runtime version is used as reference of latest release # This is set to the right value later. @@ -134,9 +134,9 @@ tag_repos() { do_tag "${tag}" - if [ "${branch}" == "master" ]; then + if [ "${branch}" == "main" ]; then if echo "${tag}" | grep -oP '.*-rc0$'; then - info "This is a rc0 for master - creating stable branch" + info "This is a rc0 for main - creating stable branch" stable_branch=$(echo ${tag} | awk 'BEGIN{FS=OFS="."}{print $1 "." $2}') stable_branch="stable-${stable_branch}" info "creating branch ${stable_branch} for ${repo}" diff --git a/tools/packaging/release/update-repository-version_test.sh b/tools/packaging/release/update-repository-version_test.sh index d86dee8dfa..9242fd1226 100755 --- a/tools/packaging/release/update-repository-version_test.sh +++ b/tools/packaging/release/update-repository-version_test.sh @@ -49,6 +49,6 @@ OK echo "Local update version update should work" new_version="50.0.0-rc0" -out=$("${script_dir}/update-repository-version.sh" "${new_version}" "master" 2>&1) +out=$("${script_dir}/update-repository-version.sh" "${new_version}" "main" 2>&1) output_should_contain "${out}" "release: Kata Containers ${new_version}" OK From 55bdd1fcf4b94f31583a938233e56d6b3f4559c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Tue, 6 Apr 2021 20:32:57 +0200 Subject: [PATCH 3/3] kata-deploy: Adapt regex for testing kata-deploy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On commit a649d33 we've started adding the specific version of the image to be used, in order to ensure people using our content from a tarball would be relying on the correct image. However, later on, @bergwolf figured out it had some undesired side effects, such as https://github.com/kata-containers/kata-containers/runs/2235812941?check_suite_focus=true What happens there is that the regular expression used to point the image to a testing one doesn't take into consideration the $VERSION, and that breaks the deployment. Fixes: #1632 Signed-off-by: Fabiano FidĂȘncio (cherry picked from commit d43098ec21c0208f41f1b537654332fd5afad4dc) --- tools/packaging/kata-deploy/action/test-kata.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/packaging/kata-deploy/action/test-kata.sh b/tools/packaging/kata-deploy/action/test-kata.sh index 3c74c639fc..95132fdee2 100755 --- a/tools/packaging/kata-deploy/action/test-kata.sh +++ b/tools/packaging/kata-deploy/action/test-kata.sh @@ -98,6 +98,7 @@ function test_kata() { [[ -z "$PKG_SHA" ]] && die "no PKG_SHA provided" YAMLPATH="./tools/packaging/kata-deploy/" + VERSION=$(cat ./VERSION) # This action could be called in two contexts: # 1. Packaging workflows: testing in packaging repository, where we assume yaml/packaging @@ -120,8 +121,8 @@ function test_kata() { kubectl get runtimeclasses # update deployment daemonset to utilize the container under test: - sed -i "s#katadocker/kata-deploy#katadocker/kata-deploy-ci:${PKG_SHA}#g" $YAMLPATH/kata-deploy/base/kata-deploy.yaml - sed -i "s#katadocker/kata-deploy#katadocker/kata-deploy-ci:${PKG_SHA}#g" $YAMLPATH/kata-cleanup/base/kata-cleanup.yaml + sed -i "s#katadocker/kata-deploy:${VERSION}#katadocker/kata-deploy-ci:${PKG_SHA}#g" $YAMLPATH/kata-deploy/base/kata-deploy.yaml + sed -i "s#katadocker/kata-deploy:${VERSION}#katadocker/kata-deploy-ci:${PKG_SHA}#g" $YAMLPATH/kata-cleanup/base/kata-cleanup.yaml cat $YAMLPATH/kata-deploy/base/kata-deploy.yaml