diff options
author | Gary Wu <gary.i.wu@huawei.com> | 2017-08-09 18:19:49 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2017-08-09 18:19:49 +0000 |
commit | bafd0b7a83b442983e3736af71da28f45b03b9ff (patch) | |
tree | 11751a6ae09eaeb3671b249138e64ebef14a58fc /bootstrap/vagrant-onap/lib/policy | |
parent | 2016306c87307d461d2e9a3fdd49a18270af278c (diff) | |
parent | 165f3e3b5322d0ff8e8e799f6d8c85568034f915 (diff) |
Merge "Implement policy image creation"
Diffstat (limited to 'bootstrap/vagrant-onap/lib/policy')
-rwxr-xr-x | bootstrap/vagrant-onap/lib/policy | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/bootstrap/vagrant-onap/lib/policy b/bootstrap/vagrant-onap/lib/policy index 71854048e..b987c4c96 100755 --- a/bootstrap/vagrant-onap/lib/policy +++ b/bootstrap/vagrant-onap/lib/policy @@ -3,39 +3,34 @@ set -o xtrace source /var/onap/functions -source /var/onap/asserts + +src_folder=$git_src_folder/policy +policy_repos=("api" "common" "docker" "drools-applications" "drools-pdp" "engine" "gui" "pap" "pdp") # clone_all_policy_repos() - Function that clones Policy source repo. function clone_all_policy_repos { - local src_folder=/opt/policy - - for dirc in api common docker drools-applications drools-pdp engine gui pap pdp; do + for dirc in ${aai_repos[@]}; do clone_repo policy/$dirc $src_folder/$dirc done } # # compile_all_policy_repos() - Function that compiles Policy source repo. function compile_all_policy_repos { - local src_folder=/opt/policy - - for dirc in api common docker drools-applications drools-pdp engine gui pap pdp; do + for dirc in ${aai_repos[@]}; do compile_src $src_folder/$dirc done } # install_policy() - Function that clones and installs the Policy services from source code function install_policy { - local src_folder=/opt/policy - - clone_all_policy_repos - if [[ "$compile_repo" == "True" ]]; then - compile_all_policy_repos - fi - if [[ "$build_image" == "True" ]]; then compile_src $src_folder/docker install_docker pushd $src_folder/docker + install_maven + mvn prepare-package + cp -r target/policy-pe/* policy-pe/ + cp -r target/policy-drools/* policy-drools bash docker_verify.sh for image in os nexus db base drools pe; do asserts_image onap/policy/policy-$image @@ -58,5 +53,10 @@ function install_policy { # init_policy() - Function that initialize Policy services function init_policy { + clone_all_policy_repos + if [[ "$compile_repo" == "True" ]]; then + compile_all_policy_repos + fi + install_policy } |