Victor Morales | 896c807 | 2017-09-12 12:19:57 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | set -o xtrace |
| 4 | |
| 5 | source /var/onap/functions |
| 6 | |
| 7 | ccsdk_src_folder=$git_src_folder/ccsdk |
| 8 | ccsdk_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 |
| 11 | function 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() - |
| 20 | function 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 |
| 29 | function _build_ccsdk_images { |
| 30 | install_package unzip |
Victor Morales | 896c807 | 2017-09-12 12:19:57 -0700 | [diff] [blame] | 31 | clone_repo ccsdk/distribution $ccsdk_src_folder/distribution |
Victor Morales | c9b8154 | 2017-09-14 15:46:21 -0700 | [diff] [blame^] | 32 | compile_src $ccsdk_src_folder/distribution |
Victor Morales | 896c807 | 2017-09-12 12:19:57 -0700 | [diff] [blame] | 33 | 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 |
| 39 | function 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() - |
| 51 | function install_ccsdk { |
| 52 | echo "pass" |
| 53 | } |
| 54 | |
| 55 | # init_ccsdk() - Function that initialize Multi Cloud services |
| 56 | function 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 | } |