blob: 588f32b8780de32ce26da8336f69b40e63a8e22f [file] [log] [blame]
Victor Moralesd3cbcf22017-10-25 16:01:58 -07001#!/bin/bash
2
3set -o xtrace
4
5source /var/onap/functions
6
7vvp_src_folder=$git_src_folder/vvp
8vvp_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.
11function 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
18function 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
25function _build_vvp_images {
26 echo "pass"
27}
28
29# get_vvp_images - Function that clones vvp Docker images
30function 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
40function install_vvp {
41 echo "pass"
42}
43
44# init_vvp() - Init VNFSDK services
45function 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}