blob: 93ee0c85db46a951050f625df69fb07f945f12ec [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
Victor Morales896c8072017-09-12 12:19:57 -07005# _build_ccsdk_images() - Build CCSDK Docker images from source code
6function _build_ccsdk_images {
7 install_package unzip
Victor Moralesf8730f52018-03-02 13:24:33 -08008 compile_src ${src_folders[ccsdk]}/distribution
Victor Morales896c8072017-09-12 12:19:57 -07009 for image in ubuntu opendaylight odlsli dgbuilder-docker; do
Victor Moralesf8730f52018-03-02 13:24:33 -080010 build_docker_image ${src_folders[ccsdk]}/distribution/$image docker
Victor Morales896c8072017-09-12 12:19:57 -070011 done
12}
13
14# get_ccsdk_images() - Get CCSDK Docker images
15function get_ccsdk_images {
16 if [[ "$build_image" == "True" ]]; then
17 _build_ccsdk_images
18 else
19 for image in ubuntu odl dgbuilder; do
20 pull_onap_image ccsdk-$image-image
21 done
22 fi
Victor Morales896c8072017-09-12 12:19:57 -070023}
24
25# init_ccsdk() - Function that initialize Multi Cloud services
26function init_ccsdk {
27 if [[ "$clone_repo" == "True" ]]; then
Victor Moralesf1f1ba52017-11-20 16:38:28 -080028 clone_repos "ccsdk"
Victor Morales896c8072017-09-12 12:19:57 -070029 if [[ "$compile_repo" == "True" ]]; then
Victor Moralesf1f1ba52017-11-20 16:38:28 -080030 compile_repos "ccsdk"
Victor Morales896c8072017-09-12 12:19:57 -070031 fi
32 fi
Victor Moralesf1f1ba52017-11-20 16:38:28 -080033 if [[ "$skip_get_images" == "False" ]]; then
34 get_ccsdk_images
35 fi
Victor Morales896c8072017-09-12 12:19:57 -070036}