Fix repository bug in nexus_image_add 48/110148/1
authorOndřej Šmalec <o.smalec@partner.samsung.com>
Tue, 14 Jul 2020 08:25:53 +0000 (10:25 +0200)
committerOndřej Šmalec <o.smalec@partner.samsung.com>
Tue, 14 Jul 2020 08:38:40 +0000 (10:38 +0200)
Script assume repository is always part of image name.
So if image to be download was put without repository,
it caused removal of subdirectory.
Previously:
nexus3.onap.org/onap/aaf:1.0 -> onap/aaf:1.0
onap/aaf:1.0 -> aaf:1.0

Now:
nexus3.onap.org/onap/aaf:1.0 -> onap/aaf:1.0
onap/aaf:1.0 -> onap/aaf:1.0

Issue-ID: OOM-2510
Signed-off-by: Ondřej Šmalec <o.smalec@partner.samsung.com>
Change-Id: Ia5deedf4695790cf25e1d062d5dccbf9173e5592

tools/nexus_image_add.sh

index 3594081..17e5915 100755 (executable)
@@ -16,7 +16,7 @@ REMOTE_PASSWD=
 #User and password for docker login on localhost
 LOCAL_USER=
 LOCAL_PASSWD=
-IMAGE=`sed 's/^[^/]*\///g' <<< ${1}`
+IMAGE=`sed 's/^[^.]*\.[^/]*\///g' <<< ${1}`
 
 help()
 {