Victor Morales | 896c807 | 2017-09-12 12:19:57 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
Victor Morales | 896c807 | 2017-09-12 12:19:57 -0700 | [diff] [blame] | 3 | source /var/onap/functions |
| 4 | |
| 5 | ccsdk_src_folder=$git_src_folder/ccsdk |
Victor Morales | 21404d7 | 2017-10-20 13:18:26 -0700 | [diff] [blame] | 6 | ccsdk_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 Morales | 896c807 | 2017-09-12 12:19:57 -0700 | [diff] [blame] | 11 | |
Victor Morales | 896c807 | 2017-09-12 12:19:57 -0700 | [diff] [blame] | 12 | # _build_ccsdk_images() - Build CCSDK Docker images from source code |
| 13 | function _build_ccsdk_images { |
| 14 | install_package unzip |
Victor Morales | c9b8154 | 2017-09-14 15:46:21 -0700 | [diff] [blame] | 15 | compile_src $ccsdk_src_folder/distribution |
Victor Morales | 896c807 | 2017-09-12 12:19:57 -0700 | [diff] [blame] | 16 | 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 |
| 22 | function 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 Morales | 896c807 | 2017-09-12 12:19:57 -0700 | [diff] [blame] | 30 | } |
| 31 | |
| 32 | # init_ccsdk() - Function that initialize Multi Cloud services |
| 33 | function init_ccsdk { |
| 34 | if [[ "$clone_repo" == "True" ]]; then |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame] | 35 | clone_repos "ccsdk" |
Victor Morales | 896c807 | 2017-09-12 12:19:57 -0700 | [diff] [blame] | 36 | if [[ "$compile_repo" == "True" ]]; then |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame] | 37 | compile_repos "ccsdk" |
Victor Morales | 896c807 | 2017-09-12 12:19:57 -0700 | [diff] [blame] | 38 | fi |
| 39 | fi |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame] | 40 | if [[ "$skip_get_images" == "False" ]]; then |
| 41 | get_ccsdk_images |
| 42 | fi |
Victor Morales | 896c807 | 2017-09-12 12:19:57 -0700 | [diff] [blame] | 43 | } |