mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-25 06:52:13 +00:00
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:
commit
e5df408f64
@ -98,6 +98,7 @@ function test_kata() {
|
|||||||
[[ -z "$PKG_SHA" ]] && die "no PKG_SHA provided"
|
[[ -z "$PKG_SHA" ]] && die "no PKG_SHA provided"
|
||||||
|
|
||||||
YAMLPATH="./tools/packaging/kata-deploy/"
|
YAMLPATH="./tools/packaging/kata-deploy/"
|
||||||
|
VERSION=$(cat ./VERSION)
|
||||||
|
|
||||||
# This action could be called in two contexts:
|
# This action could be called in two contexts:
|
||||||
# 1. Packaging workflows: testing in packaging repository, where we assume yaml/packaging
|
# 1. Packaging workflows: testing in packaging repository, where we assume yaml/packaging
|
||||||
@ -120,8 +121,8 @@ function test_kata() {
|
|||||||
kubectl get runtimeclasses
|
kubectl get runtimeclasses
|
||||||
|
|
||||||
# update deployment daemonset to utilize the container under test:
|
# 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:${VERSION}#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-cleanup/base/kata-cleanup.yaml
|
||||||
|
|
||||||
cat $YAMLPATH/kata-deploy/base/kata-deploy.yaml
|
cat $YAMLPATH/kata-deploy/base/kata-deploy.yaml
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ MK_DIR :=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
|
|||||||
.PHONY: bump-kata-version
|
.PHONY: bump-kata-version
|
||||||
|
|
||||||
NEW_VERSION :=
|
NEW_VERSION :=
|
||||||
TARGET_BRANCH ?= "master"
|
TARGET_BRANCH ?= "main"
|
||||||
|
|
||||||
# Run update-repository-version.sh
|
# Run update-repository-version.sh
|
||||||
# $1 : repository to bump
|
# $1 : repository to bump
|
||||||
|
@ -81,7 +81,7 @@ verify_hub() {
|
|||||||
go get -d ${hub_repo} || true
|
go get -d ${hub_repo} || true
|
||||||
pushd ${GOPATH}/src/${hub_repo}
|
pushd ${GOPATH}/src/${hub_repo}
|
||||||
make
|
make
|
||||||
make install prefix=/usr/local
|
sudo -E make install prefix=/usr/local
|
||||||
popd
|
popd
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ script_name="$(basename "${BASH_SOURCE[0]}")"
|
|||||||
OWNER=${OWNER:-"kata-containers"}
|
OWNER=${OWNER:-"kata-containers"}
|
||||||
PROJECT="Kata Containers"
|
PROJECT="Kata Containers"
|
||||||
PUSH="${PUSH:-"false"}"
|
PUSH="${PUSH:-"false"}"
|
||||||
branch="master"
|
branch="main"
|
||||||
readonly URL_RAW_FILE="https://raw.githubusercontent.com/${OWNER}"
|
readonly URL_RAW_FILE="https://raw.githubusercontent.com/${OWNER}"
|
||||||
#The runtime version is used as reference of latest release
|
#The runtime version is used as reference of latest release
|
||||||
# This is set to the right value later.
|
# This is set to the right value later.
|
||||||
@ -134,9 +134,9 @@ tag_repos() {
|
|||||||
|
|
||||||
do_tag "${tag}"
|
do_tag "${tag}"
|
||||||
|
|
||||||
if [ "${branch}" == "master" ]; then
|
if [ "${branch}" == "main" ]; then
|
||||||
if echo "${tag}" | grep -oP '.*-rc0$'; 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=$(echo ${tag} | awk 'BEGIN{FS=OFS="."}{print $1 "." $2}')
|
||||||
stable_branch="stable-${stable_branch}"
|
stable_branch="stable-${stable_branch}"
|
||||||
info "creating branch ${stable_branch} for ${repo}"
|
info "creating branch ${stable_branch} for ${repo}"
|
||||||
|
@ -49,6 +49,6 @@ OK
|
|||||||
|
|
||||||
echo "Local update version update should work"
|
echo "Local update version update should work"
|
||||||
new_version="50.0.0-rc0"
|
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}"
|
output_should_contain "${out}" "release: Kata Containers ${new_version}"
|
||||||
OK
|
OK
|
||||||
|
Loading…
Reference in New Issue
Block a user