blob: 03987ea7e89a9e6efb9bf508f667488d93bac779 [file] [log] [blame]
#!/bin/bash
set -o xtrace
source /var/onap/functions
ccsdk_src_folder=$git_src_folder/ccsdk
ccsdk_repos=("ccsdk" "ccsdk/dashboard" "ccsdk/distribution" "ccsdk/parent"
"ccsdk/platform/blueprints" "ccsdk/platform/nbapi" "ccsdk/platform/plugins"
"ccsdk/sli" "ccsdk/sli/adaptors" "ccsdk/sli/core" "ccsdk/sli/northbound"
"ccsdk/sli/plugins" "ccsdk/storage" "ccsdk/storage/esaas" "ccsdk/storage/pgaas"
"ccsdk/utils")
# clone_ccsdk_repos() - Function that clones the CCSDK repositories
function clone_ccsdk_repos {
for repo in ${ccsdk_repos[@]}; do
clone_repo $repo $ccsdk_src_folder${repo#ccsdk}
done
}
# compile_ccsdk_repos() -
function compile_ccsdk_repos {
install_package unzip
for repo in ${ccsdk_repos[@]}; do
compile_src $ccsdk_src_folder${repo#ccsdk}
done
}
# _build_ccsdk_images() - Build CCSDK Docker images from source code
function _build_ccsdk_images {
install_package unzip
clone_repo ccsdk/distribution $ccsdk_src_folder/distribution
compile_src $ccsdk_src_folder/distribution
for image in ubuntu opendaylight odlsli dgbuilder-docker; do
build_docker_image $ccsdk_src_folder/distribution/$image docker
done
}
# get_ccsdk_images() - Get CCSDK Docker images
function get_ccsdk_images {
if [[ "$build_image" == "True" ]]; then
_build_ccsdk_images
else
for image in ubuntu odl dgbuilder; do
pull_onap_image ccsdk-$image-image
done
fi
}
# init_ccsdk() - Function that initialize Multi Cloud services
function init_ccsdk {
if [[ "$clone_repo" == "True" ]]; then
clone_ccsdk_repos
if [[ "$compile_repo" == "True" ]]; then
compile_ccsdk_repos
fi
fi
}