Merge pull request #1653 from fidencio/wip/stable-2.0-fix-kata-deploy-test-script

stable-2.0 | kata-deploy: Fix test-kata.sh and do some small cleanups / improvements in the kata-deploy script
This commit is contained in:
Fabiano Fidêncio 2021-04-08 17:43:54 +02:00 committed by GitHub
commit e5df408f64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 8 deletions

View File

@ -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

View File

@ -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

View File

@ -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
}

View File

@ -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}"

View File

@ -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