summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomáš Levora <t.levora@partner.samsung.com>2019-05-30 17:11:28 +0200
committerTomáš Levora <t.levora@partner.samsung.com>2019-05-31 14:13:28 +0200
commit12836bfcb03693cdc34f960a68276a7e6b39478b (patch)
tree92d51ff01417d3d462bef59170d78ba1bc370a6e
parente8e9f78667ca86f21896e2fe5ea0904202bf2336 (diff)
Add comment to automatically generated docker list
Add comment to docker image list generated by docker-images-collector.sh to reffer to commit id in case of ONAP or to project in other cases Issue-ID: OOM-1884 Change-Id: I7ff32fae84db3476495eb2e560c3bf61e41e2ddb Signed-off-by: Tomáš Levora <t.levora@partner.samsung.com>
-rwxr-xr-xbuild/creating_data/docker-images-collector.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/build/creating_data/docker-images-collector.sh b/build/creating_data/docker-images-collector.sh
index 7e468c44..e2b56fa7 100755
--- a/build/creating_data/docker-images-collector.sh
+++ b/build/creating_data/docker-images-collector.sh
@@ -106,12 +106,17 @@ popd
# Create the list from all enabled subsystems
echo "Creating the list..."
if [ "${PROJECT}" == "onap" ]; then
+ COMMENT="OOM commit $(git --git-dir="${PROJECT_DIR}/../../.git" rev-parse HEAD)"
for subsystem in `parse_yaml "${PROJECT_DIR}/values.yaml"`; do
create_list ${subsystem}
- done
+ done | sort -u > ${LIST}
else
- create_list ${PROJECT}
-fi | sort -u > ${LIST}
+ COMMENT="${PROJECT}"
+ create_list ${PROJECT} | sort -u > ${LIST}
+fi
+
+# Add comment reffering to the project
+sed -i "1i# generated from ${COMMENT}" "${LIST}"
echo -e ${MSG}
echo -e 'The list has been created:\n '"${LIST}"