diff options
author | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2018-09-22 18:29:31 +0200 |
---|---|---|
committer | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2018-09-24 18:24:43 +0200 |
commit | e49ffac10dc059b9133586ae4991446f5a5915de (patch) | |
tree | ba944b5a3dfdfd1562620f26671af6185ae8a9af /ci | |
parent | d7bf560e12151853c3121ba39ad9bf6bd47befcf (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>
Diffstat (limited to 'ci')
-rwxr-xr-x | ci/build.sh | 1 | ||||
-rwxr-xr-x | ci/deploy.sh | 4 |
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 |