Script to pull ONAP images in helm charts 63/91763/2
authorGary Wu <gary.wu@futurewei.com>
Fri, 19 Jul 2019 17:47:12 +0000 (10:47 -0700)
committerYang Xu <yang.xu@futurewei.com>
Fri, 19 Jul 2019 17:51:29 +0000 (17:51 +0000)
Issue-ID: INT-1117
Signed-off-by: Gary Wu <gary.wu@futurewei.com>
Change-Id: Iefba99a8cec034e3fb8d0bf828aeb342ee0f8d5e

version-manifest/src/main/scripts/pull-docker-images.sh [new file with mode: 0755]

diff --git a/version-manifest/src/main/scripts/pull-docker-images.sh b/version-manifest/src/main/scripts/pull-docker-images.sh
new file mode 100755 (executable)
index 0000000..32efc6b
--- /dev/null
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+if [ "$#" -lt 1 ]; then
+    echo This script pulls all the ONAP docker images contained in OOM helm charts
+    echo "$0 <oom repo directory> <proxy URL>"
+    exit 1
+fi
+
+OOM_DIR=$(realpath $1)
+PROXY="nexus3.onap.org:10001"
+
+if [ "$#" -eq 2 ]; then
+    PROXY=$2
+fi
+
+
+if [ -z "$WORKSPACE" ]; then
+    export WORKSPACE=`git rev-parse --show-toplevel`
+fi
+
+
+MANIFEST=$(mktemp --suffix=-docker-manifest.csv)
+$WORKSPACE/version-manifest/src/main/scripts/generate-docker-manifest.sh $MANIFEST $OOM_DIR
+IMAGES=$(tail -n +2 $MANIFEST | tr ',' ':')
+
+for image in $IMAGES; do
+    docker pull ${PROXY}/${image}
+done