summaryrefslogtreecommitdiffstats
path: root/mcp/scripts/lib.sh
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-08-19 23:28:03 +0200
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-08-21 17:21:28 +0200
commit2f4c3eca2cc08caa3560da153cf5ba6a2268c10e (patch)
treece9d5acb51df51011fbf3db90c9594b4013c0496 /mcp/scripts/lib.sh
parentbba197c75ad98018e1dec388e6b27217982f154c (diff)
[jump req] Add build/deploy specific requirements
Add support for different prerequisites depending on the current operation (docker build or cluster deploy). Leverage the new support to pre-install upcoming deps: - python-pip (build); - docker-compose (deploy); JIRA: FUEL-383 Change-Id: Ic3e6062b1943e3584f0b1f80d2e33b8812defced Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'mcp/scripts/lib.sh')
-rw-r--r--mcp/scripts/lib.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh
index c566cc993..c3a71a436 100644
--- a/mcp/scripts/lib.sh
+++ b/mcp/scripts/lib.sh
@@ -321,6 +321,7 @@ function prepare_vms {
}
function jumpserver_pkg_install {
+ local req_type=$1
if [ -n "$(command -v apt-get)" ]; then
pkg_type='deb'; pkg_cmd='sudo apt-get install -y'
else
@@ -328,7 +329,7 @@ function jumpserver_pkg_install {
fi
eval "$(parse_yaml "./requirements_${pkg_type}.yaml")"
for section in 'common' "$(uname -i)"; do
- section_var="requirements_pkg_${section}[*]"
+ section_var="${req_type}_${section}[*]"
pkg_list+=" ${!section_var}"
done
# shellcheck disable=SC2086