summaryrefslogtreecommitdiffstats
path: root/build/creating_data/download-files.sh
blob: 89e2026c39fc67dc4b35782d9d7c98aae669bc50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#   COPYRIGHT NOTICE STARTS HERE
#
#   Copyright 2018 © Samsung Electronics Co., Ltd.
#
#   Licensed under the Apache License, Version 2.0 (the "License");
#   you may not use this file except in compliance with the License.
#   You may obtain a copy of the License at
#
#       http://www.apache.org/licenses/LICENSE-2.0
#
#   Unless required by applicable law or agreed to in writing, software
#   distributed under the License is distributed on an "AS IS" BASIS,
#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#   See the License for the specific language governing permissions and
#   limitations under the License.
#
#   COPYRIGHT NOTICE ENDS HERE

LIST_FILE="$1"
if [[ -z "$LIST_FILE" ]]; then
    echo "Missing list file"
    exit 1
fi

outdir="$2"
if [[ -z "$outdir" ]]; then
    echo "Missing output directory"
    exit 1
fi

lines=$(cat "$LIST_FILE" | wc -l)
cnt=1

# create output dir if not exists
mkdir -p "$outdir"

while read -r line; do
    # www.springframework.org/schema/tool/spring-tool-4.3.xsd
    file="${line%%\?*}"
    filename=$(basename "$file")
    echo "Downloading $cnt / $lines: $file"
    # following curl params are ensurring 5 reties and cut-off if connectivity will
    # drop below 10b/10s
    curl --retry 5 -y 10 -Y 10 --location  "$line" -o "$outdir/$filename" &>/dev/null
    cnt=$((cnt+1))

done < "$LIST_FILE"
st $ccsdk_src_folder/sli/core/$core/$component/target/$core-$component-0.1.2-SNAPSHOT.jar done asserts_file_exist $ccsdk_src_folder/sli/core/$core/installer/target/sdnc-$core-0.1.2-SNAPSHOT-installer.zip done asserts_file_exist $ccsdk_src_folder/sli/core/sli/common/target/sli-common-0.1.2-SNAPSHOT.jar asserts_file_exist $ccsdk_src_folder/sli/core/sli/recording/target/sli-recording-0.1.2-SNAPSHOT.jar asserts_file_exist $ccsdk_src_folder/sli/core/sliapi/model/target/sliapi-model-0.1.2-SNAPSHOT.jar for northbound in asdcApi dataChange; do for component in features model provider; do asserts_file_exist $ccsdk_src_folder/sli/northbound/$northbound/$component/target/$northbound-$component-0.1.0-SNAPSHOT.jar done asserts_file_exist $ccsdk_src_folder/sli/northbound/$northbound/installer/target/sdnc-$northbound-0.1.0-SNAPSHOT-installer.zip done asserts_file_exist $ccsdk_src_folder/sli/northbound/dmaap-listener/target/dmaap-listener-0.1.0-SNAPSHOT.jar asserts_file_exist $ccsdk_src_folder/sli/northbound/ueb-listener/target/ueb-listener-0.1.0-SNAPSHOT.jar for plugin in properties-node restapi-call-node; do for component in features provider; do asserts_file_exist $ccsdk_src_folder/sli/plugins/$plugin/$component/target/$plugin-$component-0.1.0-SNAPSHOT.jar done asserts_file_exist $ccsdk_src_folder/sli/plugins/$plugin/installer/target/sdnc-$plugin-0.1.0-SNAPSHOT-installer.zip done } # test_get_ccsdk_images() - Verify that CCSDK images are retrieved or built properly function test_get_ccsdk_images { clone_ccsdk_repos get_ccsdk_images for image in dgbuilder odlsli odl ubuntu; do asserts_image onap/ccsdk-$image-image done } if [ "$1" != '*' ]; then unset covered_functions covered_functions=$1 fi main "${covered_functions[@]}"