From d43098ec21c0208f41f1b537654332fd5afad4dc 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] 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 60f6315 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. Depends-on: github.com/kata-containers/kata-containers#1641 Fixes: #1632 Signed-off-by: Fabiano FidĂȘncio --- 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