blob: 9f00e9ad2a45a0cb638dd8762ce74520f0aa98a4 [file] [log] [blame]
Victor Morales896c8072017-09-12 12:19:57 -07001#!/bin/bash
2
Victor Morales896c8072017-09-12 12:19:57 -07003source /var/onap/functions
4
5ccsdk_src_folder=$git_src_folder/ccsdk
Victor Morales21404d72017-10-20 13:18:26 -07006ccsdk_repos=("ccsdk" "ccsdk/dashboard" "ccsdk/distribution" "ccsdk/parent"
7"ccsdk/platform/blueprints" "ccsdk/platform/nbapi" "ccsdk/platform/plugins"
8"ccsdk/sli" "ccsdk/sli/adaptors" "ccsdk/sli/core" "ccsdk/sli/northbound"
9"ccsdk/sli/plugins" "ccsdk/storage" "ccsdk/storage/esaas" "ccsdk/storage/pgaas"
10"ccsdk/utils")
Victor Morales896c8072017-09-12 12:19:57 -070011
Victor Morales896c8072017-09-12 12:19:57 -070012# _build_ccsdk_images() - Build CCSDK Docker images from source code
13function _build_ccsdk_images {
14 install_package unzip
Victor Moralesc9b81542017-09-14 15:46:21 -070015 compile_src $ccsdk_src_folder/distribution
Victor Morales896c8072017-09-12 12:19:57 -070016 for image in ubuntu opendaylight odlsli dgbuilder-docker; do
17 build_docker_image $ccsdk_src_folder/distribution/$image docker
18 done
19}
20
21# get_ccsdk_images() - Get CCSDK Docker images
22function get_ccsdk_images {
23 if [[ "$build_image" == "True" ]]; then
24 _build_ccsdk_images
25 else
26 for image in ubuntu odl dgbuilder; do
27 pull_onap_image ccsdk-$image-image
28 done
29 fi
Victor Morales896c8072017-09-12 12:19:57 -070030}
31
32# init_ccsdk() - Function that initialize Multi Cloud services
33function init_ccsdk {
34 if [[ "$clone_repo" == "True" ]]; then
Victor Moralesf1f1ba52017-11-20 16:38:28 -080035 clone_repos "ccsdk"
Victor Morales896c8072017-09-12 12:19:57 -070036 if [[ "$compile_repo" == "True" ]]; then
Victor Moralesf1f1ba52017-11-20 16:38:28 -080037 compile_repos "ccsdk"
Victor Morales896c8072017-09-12 12:19:57 -070038 fi
39 fi
Victor Moralesf1f1ba52017-11-20 16:38:28 -080040 if [[ "$skip_get_images" == "False" ]]; then
41 get_ccsdk_images
42 fi
Victor Morales896c8072017-09-12 12:19:57 -070043}