37385dd55f6bded352cd904dccc73cd5a07a4fd7
[integration.git] / deployment / heat / onap-rke / scripts / prepull-docker.sh
1 #!/bin/bash -x
2 #
3 # Copyright 2018 Huawei Technologies Co., Ltd.
4 #
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
8 #
9 #     http://www.apache.org/licenses/LICENSE-2.0
10 #
11
12 if [ -z "$WORKSPACE" ]; then
13     export WORKSPACE=`git rev-parse --show-toplevel`
14 fi
15
16 if [ "$#" -ne 1 ]; then
17     echo "Usage: $0 <docker-proxy>"
18     exit 1
19 fi
20 DOCKER_PROXY=$1
21
22 for MANIFEST in docker-manifest.csv docker-manifest-staging.csv; do
23     for DOCKER_IMAGE in $(tail -n +2 $WORKSPACE/version-manifest/src/main/resources/$MANIFEST | tr ',' ':'); do
24         docker pull $DOCKER_PROXY/$DOCKER_IMAGE
25     done
26 done