summaryrefslogtreecommitdiffstats
path: root/bootstrap/vagrant-onap/lib/ccsdk
diff options
context:
space:
mode:
authorVictor Morales <victor.morales@intel.com>2017-11-20 16:38:28 -0800
committerVictor Morales <victor.morales@intel.com>2017-11-20 16:38:28 -0800
commitf1f1ba5dac1b531c346758072c798ceb511100b3 (patch)
treea571f9e83be31abd3c63595c04a46dcd7e901a7d /bootstrap/vagrant-onap/lib/ccsdk
parent25bfc6b99f73bd02047dcc13e64390140777402a (diff)
Refactor clone and compile functions
The clone_all_* and compile_all_* functions share same instructions for performing their functionality. This change pretends to reduce the duplication of the code. Change-Id: Ief63a5a58c79af85c829602b0451637424659438 Signed-off-by: Victor Morales <victor.morales@intel.com> Issue-Id: INT-339
Diffstat (limited to 'bootstrap/vagrant-onap/lib/ccsdk')
-rwxr-xr-xbootstrap/vagrant-onap/lib/ccsdk23
1 files changed, 5 insertions, 18 deletions
diff --git a/bootstrap/vagrant-onap/lib/ccsdk b/bootstrap/vagrant-onap/lib/ccsdk
index 3502e01e8..9f00e9ad2 100755
--- a/bootstrap/vagrant-onap/lib/ccsdk
+++ b/bootstrap/vagrant-onap/lib/ccsdk
@@ -9,25 +9,9 @@ ccsdk_repos=("ccsdk" "ccsdk/dashboard" "ccsdk/distribution" "ccsdk/parent"
"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
@@ -48,9 +32,12 @@ function get_ccsdk_images {
# init_ccsdk() - Function that initialize Multi Cloud services
function init_ccsdk {
if [[ "$clone_repo" == "True" ]]; then
- clone_ccsdk_repos
+ clone_repos "ccsdk"
if [[ "$compile_repo" == "True" ]]; then
- compile_ccsdk_repos
+ compile_repos "ccsdk"
fi
fi
+ if [[ "$skip_get_images" == "False" ]]; then
+ get_ccsdk_images
+ fi
}