summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartek Grzybowski <b.grzybowski@partner.samsung.com>2019-10-03 09:12:35 +0000
committerGerrit Code Review <gerrit@onap.org>2019-10-03 09:12:35 +0000
commitec5d45ce17d16982f22039409dccc756fd4a057c (patch)
tree28670f2f6a76c9bf524f1949037a7dbb111a82d6
parent7b37235d259400ba180ba81113c2143f5a59b4aa (diff)
parent70ec9f45965ae9ef3d65df19886412deba376524 (diff)
Merge "Add more info to generated blob data"
-rwxr-xr-xbuild/build_nexus_blob.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/build/build_nexus_blob.sh b/build/build_nexus_blob.sh
index 51ab05e7..f964bf9d 100755
--- a/build/build_nexus_blob.sh
+++ b/build/build_nexus_blob.sh
@@ -333,7 +333,13 @@ chown 200:200 ${NEXUS_DATA_DIR}
chmod 777 ${NEXUS_DATA_DIR}
# Save Nexus version to prevent/catch data incompatibility
-docker images --no-trunc | grep sonatype/nexus3 | awk '{ print $1":"$2" "$3}' > ${NEXUS_DATA_DIR}/nexus.ver
+# Adding commit informations to have link to data from which the blob was built
+cat >> ${NEXUS_DATA_DIR}/nexus.ver << INFO
+nexus_image=$(docker image ls ${NEXUS_IMAGE} --no-trunc --format "{{.Repository}}:{{.Tag}}\nnexus_image_digest={{.ID}}")
+$(for INDEX in ${!NXS_DOCKER_IMG_LISTS[@]}; do printf 'used_image_list%s=%s\n' "$INDEX" "$(sed 's/^.*\/\(.*\)$/\1/' <<< ${NXS_DOCKER_IMG_LISTS[$INDEX]})"; done)
+$(sed -n 's/^.*OOM\ commit\ /oom_repo_commit=/p' ${NXS_DOCKER_IMG_LISTS[@]})
+installer_repo_commit=$(git --git-dir="${LOCAL_PATH}/../.git" rev-parse HEAD)
+INFO
# Start the Nexus
NEXUS_CONT_ID=$(docker run -d --rm -v ${NEXUS_DATA_DIR}:/nexus-data:rw --name ${NEXUS_DOMAIN} ${PUBLISHED_PORTS} ${NEXUS_IMAGE})