From bdced49a2f16f1787088aa4f1013d8a07be51ec4 Mon Sep 17 00:00:00 2001 From: rameshiyer27 Date: Wed, 28 Jun 2023 12:15:14 +0100 Subject: Make update to allow local image to be used in Nordix Change-Id: I6be9de1afa529c0d6f20ecfd594a1b48a45b543a Issue-ID: POLICY-4647 Signed-off-by: zrrmmua --- csit/run-k8s-csit.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'csit') diff --git a/csit/run-k8s-csit.sh b/csit/run-k8s-csit.sh index 758617af..d383d1a1 100755 --- a/csit/run-k8s-csit.sh +++ b/csit/run-k8s-csit.sh @@ -284,6 +284,13 @@ function push_acelement_chart() { OPERATION="$1" PROJECT="$2" +if [ -z "$3" ] +then + LOCALIMAGE="false" +else + LOCALIMAGE="$3" +fi + if [ $OPERATION == "install" ]; then spin_microk8s_cluster @@ -291,6 +298,11 @@ if [ $OPERATION == "install" ]; then set_project_config echo "Installing policy helm charts in the default namespace" source ${WORKSPACE}/compose/get-k8s-versions.sh + if [ $LOCALIMAGE == "true" ]; then + echo "loading local image" + source ${WORKSPACE}/compose/get-versions.sh + ${WORKSPACE}/compose/loaddockerimage.sh + fi cd ${WORKSPACE}/helm || exit sudo microk8s helm dependency build policy sudo microk8s helm install csit-policy policy ${SET_VALUES} @@ -316,5 +328,5 @@ elif [ $OPERATION == "clean" ]; then teardown_cluster else - echo "Invalid arguments provided. Usage: $0 [options..] {install {project_name} | uninstall | clean}" + echo "Invalid arguments provided. Usage: $0 [options..] {install {project_name} | uninstall | clean} {uselocalimage = true/false}" fi -- cgit 1.2.3-korg