Check for duplicate entries in manifests 44/71344/1
authorGary Wu <gary.i.wu@huawei.com>
Fri, 26 Oct 2018 20:21:05 +0000 (13:21 -0700)
committerGary Wu <gary.i.wu@huawei.com>
Fri, 26 Oct 2018 20:21:05 +0000 (13:21 -0700)
Change-Id: Ibb63db5372d0000670e5c35df5c0c4e3313881ba
Issue-ID: INT-586
Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
version-manifest/src/main/resources/docker-manifest-staging.csv
version-manifest/src/main/scripts/check-sorted.sh

index f74db33..10dc7be 100644 (file)
@@ -157,8 +157,5 @@ onap/vvp/portal,1.0.0
 onap/vvp/postgresql,1.0.0
 onap/vvp/test-engine,1.0.0
 onap/workflow-backend,1.3.1-SNAPSHOT
-onap/workflow-backend,latest
 onap/workflow-frontend,1.3.1-SNAPSHOT
-onap/workflow-frontend,latest
-onap/workflow-init,1.3.0-SNAPSHOT
 onap/workflow-init,1.3.1-SNAPSHOT
index 70ca5ac..eb41dde 100755 (executable)
@@ -7,6 +7,7 @@ if [ "$#" -ne 1 ]; then
 fi
 
 LC_ALL=C sort -c $1
+
 retval=$?
 if [ $retval -ne 0 ]; then
     echo
@@ -16,4 +17,12 @@ if [ $retval -ne 0 ]; then
     echo "  mv $1.tmp $1"
     echo
 fi
+
+# check that there are no duplicate records
+DUPLICATES=$(rev < $1 | cut -f2- -d, | uniq -d | rev | tr ',' ':')
+for DUP in $DUPLICATES; do
+    echo "[ERROR] $DUP has duplicate entries"
+    ((retval++))
+done
+
 exit $retval