blob: 6ea829fb5285da13509637299cd3d4ce304cbfce [file] [log] [blame]
Victor Morales896c8072017-09-12 12:19:57 -07001#!/bin/bash
2
3set -o xtrace
4
5source /var/onap/functions
6
7ccsdk_src_folder=$git_src_folder/ccsdk
8ccsdk_repos=("dashboard" "distribution" "parent" "platform/blueprints" "platform/nbapi" "platform/plugins" "sli" "sli/adaptors" "sli/core" "sli/northbound" "sli/plugins" "storage" "storage/esaas" "storage/pgaas" "utils")
9
10# clone_ccsdk_repos() - Function that clones the CCSDK repositories
11function clone_ccsdk_repos {
12 clone_repo ccsdk $ccsdk_src_folder
13
14 for dirc in ${ccsdk_repos[@]}; do
15 clone_repo ccsdk/$dirc $ccsdk_src_folder/$dirc
16 done
17}
18
19# compile_ccsdk_repos() -
20function compile_ccsdk_repos {
21 compile_src ccsdk $ccsdk_src_folder
22
23 for dirc in ${ccsdk_repos[@]}; do
24 compile_src $ccsdk_src_folder/$dirc
25 done
26}
27
28# _build_ccsdk_images() - Build CCSDK Docker images from source code
29function _build_ccsdk_images {
30 install_package unzip
Victor Morales896c8072017-09-12 12:19:57 -070031 clone_repo ccsdk/distribution $ccsdk_src_folder/distribution
Victor Moralesc9b81542017-09-14 15:46:21 -070032 compile_src $ccsdk_src_folder/distribution
Victor Morales896c8072017-09-12 12:19:57 -070033 for image in ubuntu opendaylight odlsli dgbuilder-docker; do
34 build_docker_image $ccsdk_src_folder/distribution/$image docker
35 done
36}
37
38# get_ccsdk_images() - Get CCSDK Docker images
39function get_ccsdk_images {
40 if [[ "$build_image" == "True" ]]; then
41 _build_ccsdk_images
42 else
43 for image in ubuntu odl dgbuilder; do
44 pull_onap_image ccsdk-$image-image
45 done
46 fi
47
48}
49
50# install_ccsdk() -
51function install_ccsdk {
52 echo "pass"
53}
54
55# init_ccsdk() - Function that initialize Multi Cloud services
56function init_ccsdk {
57 if [[ "$clone_repo" == "True" ]]; then
58 clone_ccsdk_repos
59 if [[ "$compile_repo" == "True" ]]; then
60 compile_ccsdk_repos
61 fi
62 fi
63 install_ccsdk
64}