Gary Wu | 611424f | 2019-07-19 10:47:12 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | if [ "$#" -lt 1 ]; then |
| 4 | echo This script pulls all the ONAP docker images contained in OOM helm charts |
| 5 | echo "$0 <oom repo directory> <proxy URL>" |
| 6 | exit 1 |
| 7 | fi |
| 8 | |
| 9 | OOM_DIR=$(realpath $1) |
| 10 | PROXY="nexus3.onap.org:10001" |
| 11 | |
| 12 | if [ "$#" -eq 2 ]; then |
| 13 | PROXY=$2 |
| 14 | fi |
| 15 | |
| 16 | |
| 17 | if [ -z "$WORKSPACE" ]; then |
| 18 | export WORKSPACE=`git rev-parse --show-toplevel` |
| 19 | fi |
| 20 | |
| 21 | |
| 22 | MANIFEST=$(mktemp --suffix=-docker-manifest.csv) |
| 23 | $WORKSPACE/version-manifest/src/main/scripts/generate-docker-manifest.sh $MANIFEST $OOM_DIR |
| 24 | IMAGES=$(tail -n +2 $MANIFEST | tr ',' ':') |
| 25 | |
| 26 | for image in $IMAGES; do |
| 27 | docker pull ${PROXY}/${image} |
| 28 | done |