aboutsummaryrefslogtreecommitdiffstats
path: root/bootstrap/vagrant-onap/lib/functions
diff options
context:
space:
mode:
authorVictor Morales <victor.morales@intel.com>2017-11-06 09:20:27 -0800
committerVictor Morales <victor.morales@intel.com>2017-11-06 09:20:27 -0800
commit7abf1a8ea14252fa55bf7da0575ad0ff21f41d61 (patch)
treefe63005167be86de8847bf6b85b7de7619ecda6a /bootstrap/vagrant-onap/lib/functions
parent2f75a72c8955a1dcf5aa367162a19bddb5eded2a (diff)
Add debug support
This change allows to control the level of verbosity for the ONAP on vagrant execution. The new debug configuration value enables verbosity setting its value to *True* Change-Id: I29a3694ea3182a02cb585af5ae8ada1f8a415c8c Signed-off-by: Victor Morales <victor.morales@intel.com> Issue-Id: INT-323
Diffstat (limited to 'bootstrap/vagrant-onap/lib/functions')
-rwxr-xr-xbootstrap/vagrant-onap/lib/functions21
1 files changed, 14 insertions, 7 deletions
diff --git a/bootstrap/vagrant-onap/lib/functions b/bootstrap/vagrant-onap/lib/functions
index 02111fa2c..1a1b2aa4c 100755
--- a/bootstrap/vagrant-onap/lib/functions
+++ b/bootstrap/vagrant-onap/lib/functions
@@ -1,7 +1,5 @@
#!/bin/bash
-set -o xtrace
-
source /var/onap/commons
source /var/onap/_composed_functions
source /var/onap/_onap_functions
@@ -48,7 +46,11 @@ function clone_repo {
local repo=$1
local dest_folder=${2:-$git_src_folder/$repo}
if [ ! -d $dest_folder ]; then
- _git_timed clone ${repo_url}${repo} $dest_folder
+ if [[ "$debug" == "False" ]]; then
+ _git_timed clone --quiet ${repo_url}${repo} $dest_folder
+ else
+ _git_timed clone ${repo_url}${repo} $dest_folder
+ fi
else
pushd $dest_folder
_git_timed pull
@@ -168,10 +170,10 @@ function install_docker {
fi
install_package software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- add-apt-repository \
+ add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
- $(lsb_release -cs) \
- stable"
+ $(lsb_release -cs) stable"
+
install_package docker-ce
_configure_docker_settings
service docker restart
@@ -225,9 +227,14 @@ function start_ODL {
function compile_src {
local src_folder=$1
pushd $src_folder
+ local mvn_build='mvn clean install -DskipTests=true -Dmaven.test.skip=true -Dmaven.javadoc.skip=true -Dadditionalparam=-Xdoclint:none'
+ if [[ "$debug" == "False" ]]; then
+ mvn_build+=" -q"
+ fi
if [ -f pom.xml ]; then
install_maven
- mvn clean install -DskipTests=true -Dmaven.test.skip=true -Dmaven.javadoc.skip=true -Dadditionalparam=-Xdoclint:none
+ echo "Compiling $src_folder folder..."
+ eval $mvn_build
fi
popd
}