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 | |
Victor Morales | 896c807 | 2017-09-12 12:19:57 -0700 | [diff] [blame] | 5 | # _build_ccsdk_images() - Build CCSDK Docker images from source code |
| 6 | function _build_ccsdk_images { |
| 7 | install_package unzip |
Victor Morales | c9b8154 | 2017-09-14 15:46:21 -0700 | [diff] [blame] | 8 | compile_src $ccsdk_src_folder/distribution |
Victor Morales | 896c807 | 2017-09-12 12:19:57 -0700 | [diff] [blame] | 9 | for image in ubuntu opendaylight odlsli dgbuilder-docker; do |
| 10 | build_docker_image $ccsdk_src_folder/distribution/$image docker |
| 11 | done |
| 12 | } |
| 13 | |
| 14 | # get_ccsdk_images() - Get CCSDK Docker images |
| 15 | function 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 Morales | 896c807 | 2017-09-12 12:19:57 -0700 | [diff] [blame] | 23 | } |
| 24 | |
| 25 | # init_ccsdk() - Function that initialize Multi Cloud services |
| 26 | function init_ccsdk { |
| 27 | if [[ "$clone_repo" == "True" ]]; then |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame] | 28 | clone_repos "ccsdk" |
Victor Morales | 896c807 | 2017-09-12 12:19:57 -0700 | [diff] [blame] | 29 | if [[ "$compile_repo" == "True" ]]; then |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame] | 30 | compile_repos "ccsdk" |
Victor Morales | 896c807 | 2017-09-12 12:19:57 -0700 | [diff] [blame] | 31 | fi |
| 32 | fi |
Victor Morales | f1f1ba5 | 2017-11-20 16:38:28 -0800 | [diff] [blame] | 33 | if [[ "$skip_get_images" == "False" ]]; then |
| 34 | get_ccsdk_images |
| 35 | fi |
Victor Morales | 896c807 | 2017-09-12 12:19:57 -0700 | [diff] [blame] | 36 | } |