summaryrefslogtreecommitdiffstats
path: root/xci/files
diff options
context:
space:
mode:
authorMarkos Chandras <mchandras@suse.de>2018-04-06 20:28:10 +0100
committerMarkos Chandras <mchandras@suse.de>2018-05-18 11:20:52 +0100
commitf95ad15a811c3111b42c09f569d0f1f303a8b597 (patch)
tree26ed83a35b01f267dbf14df1b67e60ccbb69dae2 /xci/files
parent02f2ee5f3f047f6ee5f4e570a0cb5599460de0a5 (diff)
xci: Move sourcing of configuration files to the install-lib.sh
The install-lib.sh assumes that certain configuration files have been loaded before it's sourced. However, this doesn't work well when other scripts are using install-lib.sh directly since they also need to load the same configuration files. As such, lets source all these configuration files from the install-lib.sh file directly. We also rename this file to 'xci-lib.sh' since it's not just about installation helpers anymore. Change-Id: I35e1e804db06b2bb512e4991e5fdf21a72ffaadb Signed-off-by: Markos Chandras <mchandras@suse.de>
Diffstat (limited to 'xci/files')
-rw-r--r--xci/files/xci-lib.sh (renamed from xci/files/install-lib.sh)18
1 files changed, 15 insertions, 3 deletions
diff --git a/xci/files/install-lib.sh b/xci/files/xci-lib.sh
index af86be41..bdb64513 100644
--- a/xci/files/install-lib.sh
+++ b/xci/files/xci-lib.sh
@@ -7,9 +7,21 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-# NOTE(hwoarang): Most parts of this this file were taken from the
-# bifrost repository (scripts/install-deps.sh). This script contains all
-# the necessary distro specific code to install ansible and it's dependencies.
+function bootstrap_xci_env() {
+ # Declare our virtualenv
+ export XCI_VENV=${XCI_PATH}/venv/
+
+ # source user vars
+ source $XCI_PATH/xci/config/user-vars
+ # source pinned versions
+ source $XCI_PATH/xci/config/pinned-versions
+ # source flavor configuration
+ source "$XCI_PATH/xci/config/${XCI_FLAVOR}-vars"
+ # source installer configuration
+ source "$XCI_PATH/xci/installer/${INSTALLER_TYPE}/env" &>/dev/null || true
+ # source xci configuration
+ source $XCI_PATH/xci/config/env-vars
+}
function install_ansible() {
set -eu