Victor Morales | d3cbcf2 | 2017-10-25 16:01:58 -0700 | [diff] [blame^] | 1 | #!/bin/bash |
| 2 | |
| 3 | set -o xtrace |
| 4 | |
| 5 | source /var/onap/functions |
| 6 | |
| 7 | vvp_src_folder=$git_src_folder/vvp |
| 8 | vvp_repos=("vvp/ansible-ice-bootstrap" "vvp/cms" "vvp/devkit" "vvp/documentation" "vvp/engagementmgr" "vvp/gitlab" "vvp/image-scanner" "vvp/jenkins" "vvp/portal" "vvp/postgresql" "vvp/test-engine" "vvp/validation-scripts") |
| 9 | |
| 10 | # clone_all_vvp_repos() - Function that clones vvp source repo. |
| 11 | function clone_all_vvp_repos { |
| 12 | for repo in ${vvp_repos[@]}; do |
| 13 | clone_repo $repo $vvp_src_folder${repo#*vvp} |
| 14 | done |
| 15 | } |
| 16 | |
| 17 | # compile_all_vvp_repos - Function that builds vvp source repo |
| 18 | function compile_all_vvp_repos { |
| 19 | for repo in ${vvp_repos[@]}; do |
| 20 | compile_src $vvp_src_folder${repo#*vvp} |
| 21 | done |
| 22 | } |
| 23 | |
| 24 | # _build_vvp_images() - Builds VNFSDK images from source code |
| 25 | function _build_vvp_images { |
| 26 | echo "pass" |
| 27 | } |
| 28 | |
| 29 | # get_vvp_images - Function that clones vvp Docker images |
| 30 | function get_vvp_images { |
| 31 | if [[ "$build_image" == "True" ]]; then |
| 32 | _build_vvp_images |
| 33 | else |
| 34 | pull_docker_image refrepo:1.0-STAGING-latest |
| 35 | pull_docker_image refrepo:latest |
| 36 | fi |
| 37 | } |
| 38 | |
| 39 | # install_vvp - Function that installs vvp Docker images |
| 40 | function install_vvp { |
| 41 | echo "pass" |
| 42 | } |
| 43 | |
| 44 | # init_vvp() - Init VNFSDK services |
| 45 | function init_vvp { |
| 46 | if [[ "$clone_repo" == "True" ]]; then |
| 47 | clone_all_vvp_repos |
| 48 | if [[ "$compile_repo" == "True" ]]; then |
| 49 | compile_all_vvp_repos |
| 50 | fi |
| 51 | fi |
| 52 | |
| 53 | if [[ "$skip_get_images" == "False" ]]; then |
| 54 | get_vvp_images |
| 55 | if [[ "$skip_install" == "False" ]]; then |
| 56 | install_vvp |
| 57 | fi |
| 58 | fi |
| 59 | } |