summaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-09-22 18:29:31 +0200
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-09-26 12:04:08 +0000
commit5b660398bf5388d24ea8d2bde0f8f1a599739db4 (patch)
tree840845d47a7867aa1b8eddcb41717262e1d10329 /ci
parentd9c1a02693cacd342106437f4f4525c0cdf857cd (diff)
[lib.sh] Split into multiple files for readability
lib.sh got pretty big over time, making it hard to maintain. Since most of the functions defined now in lib.sh are only required during build/deploy and not in state files, move them to a new file. While at it, prepare for running build/deploy as non-root and set a default connection string for virsh instead of using user specific config in ~/.config/libvirt/libvirt.conf, which caused end user experience issues in the past. Change-Id: Id8c2a8139e4bfdb99af2b0fad73b911ffa18ebea Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> (cherry picked from commit e49ffac10dc059b9133586ae4991446f5a5915de)
Diffstat (limited to 'ci')
-rwxr-xr-xci/build.sh1
-rwxr-xr-xci/deploy.sh4
2 files changed, 4 insertions, 1 deletions
diff --git a/ci/build.sh b/ci/build.sh
index ec0040e7d..67b6d46d8 100755
--- a/ci/build.sh
+++ b/ci/build.sh
@@ -35,6 +35,7 @@ DOCKER_PUSH=${2---push} # pass an empty second arg to disable push
source "${DEPLOY_DIR}/globals.sh"
source "${DEPLOY_DIR}/lib.sh"
+source "${DEPLOY_DIR}/lib_jump_common.sh"
[ ! "${TERM:-unknown}" = 'unknown' ] || export TERM=vt220
diff --git a/ci/deploy.sh b/ci/deploy.sh
index 5fb8c43a6..af60ddfef 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -150,6 +150,8 @@ MCP_CMP_SS=${MCP_CMP_SS:-0}
source "${DEPLOY_DIR}/globals.sh"
source "${DEPLOY_DIR}/lib.sh"
source "${DEPLOY_DIR}/lib_template.sh"
+source "${DEPLOY_DIR}/lib_jump_common.sh"
+source "${DEPLOY_DIR}/lib_jump_deploy.sh"
#
# END of variables to customize
@@ -256,7 +258,7 @@ else
virtinst_install "${MCP_STORAGE_DIR}"
fi
-if ! virsh list >/dev/null 2>&1; then
+if ! ${VIRSH} list >/dev/null 2>&1; then
notify_e "[ERROR] This script requires hypervisor access"
fi