diff options
author | Victor Morales <victor.morales@intel.com> | 2017-07-31 09:10:11 -0500 |
---|---|---|
committer | Victor Morales <victor.morales@intel.com> | 2017-07-31 09:21:20 -0500 |
commit | 970ec198ae769b50fa204ed7ad998db76a7320a2 (patch) | |
tree | 40391444d5565af3a529b4c08d7b3e8622b30ac9 /bootstrap/vagrant-onap/lib/functions | |
parent | 14387356f435a416f1f180d0d670d5760888c6b3 (diff) |
Refactor install_python function
It was extract the installation of pip packages from the
install_python function, this change allows to install python
packages isolated. This also includes the manual configuration
of java certificates required for maven execution.
Change-Id: Iac60d7521101d5c4997f95c16f4decd857cc5c3c
Signed-off-by: Victor Morales <victor.morales@intel.com>
Diffstat (limited to 'bootstrap/vagrant-onap/lib/functions')
-rwxr-xr-x | bootstrap/vagrant-onap/lib/functions | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/bootstrap/vagrant-onap/lib/functions b/bootstrap/vagrant-onap/lib/functions index b0c6e978d..a2bb98e29 100755 --- a/bootstrap/vagrant-onap/lib/functions +++ b/bootstrap/vagrant-onap/lib/functions @@ -62,6 +62,8 @@ function clone_repo { function install_dev_tools { install_package apt-transport-https install_package ca-certificates + # ca-certificates-java is not a dependency in the Oracle JDK/JRE so this must be explicitly installed. + /var/lib/dpkg/info/ca-certificates-java.postinst configure install_package curl } @@ -122,11 +124,23 @@ function install_nodejs { function install_python { install_package python2.7 install_package python-dev +} + +# _install_pip() - Install Python Package Manager +function _install_pip { + install_python curl -sL https://bootstrap.pypa.io/get-pip.py | python - pip install tox } -# install_docker() - Download and install docker-engine +# install_python_package() - Install a python module +function install_python_package { + local python_package=$1 + + _install_pip + pip install $python_package +} + +# install_docker() - Download and install docker-engine function install_docker { if is_package_installed docker-ce; then return @@ -192,7 +206,7 @@ function compile_src { pushd $src_folder if [ -f pom.xml ]; then install_maven - mvn clean install -U -DskipTests=true -Dmaven.test.skip=true -Dmaven.javadoc.skip=true -Dadditionalparam=-Xdoclint:none + mvn clean install -DskipTests=true -Dmaven.test.skip=true -Dmaven.javadoc.skip=true -Dadditionalparam=-Xdoclint:none fi popd } |