Adaptations to execute in multi-node kube cluster
Issue-ID: NONRTRIC-480
Signed-off-by: BjornMagnussonXA <bjorn.magnusson@est.tech>
Change-Id: If0df0a9ab83811f1373f50dc154ad90d830e1321
diff --git a/test/common/cr_api_functions.sh b/test/common/cr_api_functions.sh
index d587c0c..437b207 100644
--- a/test/common/cr_api_functions.sh
+++ b/test/common/cr_api_functions.sh
@@ -46,9 +46,13 @@
echo " Building CR - $CR_DISPLAY_NAME - image: $CR_IMAGE"
docker build --build-arg NEXUS_PROXY_REPO=$NEXUS_PROXY_REPO -t $CR_IMAGE . &> .dockererr
if [ $? -eq 0 ]; then
- echo -e $GREEN" Build Ok"$EGREEN
+ echo -e $GREEN" Build Ok"$EGREEN
+ __retag_and_push_image CR_IMAGE
+ if [ $? -ne 0 ]; then
+ exit 1
+ fi
else
- echo -e $RED" Build Failed"$ERED
+ echo -e $RED" Build Failed"$ERED
((RES_CONF_FAIL++))
cat .dockererr
echo -e $RED"Exiting...."$ERED
@@ -57,9 +61,13 @@
}
# Generate a string for each included image using the app display name and a docker images format string
+# If a custom image repo is used then also the source image from the local repo is listed
# arg: <docker-images-format-string> <file-to-append>
__CR_image_data() {
echo -e "$CR_DISPLAY_NAME\t$(docker images --format $1 $CR_IMAGE)" >> $2
+ if [ ! -z "$CR_IMAGE_SOURCE" ]; then
+ echo -e "-- source image --\t$(docker images --format $1 $CR_IMAGE_SOURCE)" >> $2
+ fi
}
# Scale kubernetes resources to zero