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 | f8730f5 | 2018-03-02 13:24:33 -0800 | [diff] [blame^] | 8 | compile_src ${src_folders[ccsdk]}/distribution |
Victor Morales | 896c807 | 2017-09-12 12:19:57 -0700 | [diff] [blame] | 9 | for image in ubuntu opendaylight odlsli dgbuilder-docker; do |
Victor Morales | f8730f5 | 2018-03-02 13:24:33 -0800 | [diff] [blame^] | 10 | build_docker_image ${src_folders[ccsdk]}/distribution/$image docker |
Victor Morales | 896c807 | 2017-09-12 12:19:57 -0700 | [diff] [blame] | 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 | } |