Fixing bug in docker-images-collector.sh
Some images from oom/kubernetes/common/ were not correctly collected
by creating_data/docker-images-collector.sh script
Issue-ID: OOM-1886
Change-Id: I044ca8a26353da44cd6f8e94fcb822570c954b49
Signed-off-by: Tomáš Levora <t.levora@partner.samsung.com>
diff --git a/build/creating_data/docker-images-collector.sh b/build/creating_data/docker-images-collector.sh
index e2b56fa..9206b0b 100755
--- a/build/creating_data/docker-images-collector.sh
+++ b/build/creating_data/docker-images-collector.sh
@@ -55,7 +55,14 @@
}
create_list() {
- helm template "${PROJECT_DIR}/../${1}" | grep 'image:\ \|tag_version:\ \|h._image' |
+ if [ -d "${PROJECT_DIR}/../${1}" ]; then
+ SUBSYS_DIR="${PROJECT_DIR}/../${1}"
+ elif [ -d "${PROJECT_DIR}/../common/${1}" ]; then
+ SUBSYS_DIR="${PROJECT_DIR}/../common/${1}"
+ else
+ >&2 echo -e \n" !!! ${1} sybsystem does not exist !!!"\n
+ fi
+ helm template "${SUBSYS_DIR}" | grep 'image:\ \|tag_version:\ \|h._image' |
sed -e 's/^.*\"h._image\"\ :\ //; s/^.*\"\(.*\)\".*$/\1/' \
-e 's/\x27\|,//g; s/^.*\(image\|tag_version\):\ //' | tr -d '\r'
}