diff options
author | Markos Chandras <mchandras@suse.de> | 2017-09-26 09:22:58 +0100 |
---|---|---|
committer | Markos Chandras <mchandras@suse.de> | 2017-09-27 23:11:56 +0100 |
commit | f6a885ffabd77ef9abb80c49d65772c97d9aee1e (patch) | |
tree | 3d7472e323bb266d3e0feb6c0efeef3818662d2b /xci/scripts/vm | |
parent | 1e58883c62e464b1d7583489f67b10dcd13f5928 (diff) |
xci: scripts: start-new-vm.sh: Print dib output when running on CI
Until we are able to fetch the dib images from external resources, we
need to build them as part of the job. diskimage-builder can sometimes
fail so we need to be able to see the log for debug purposes.
Change-Id: Iab8bfba08daa7095cf76537f629c8e7bf6330b17
Signed-off-by: Markos Chandras <mchandras@suse.de>
Diffstat (limited to 'xci/scripts/vm')
-rwxr-xr-x | xci/scripts/vm/build-dib-os.sh | 2 | ||||
-rwxr-xr-x | xci/scripts/vm/start-new-vm.sh | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/xci/scripts/vm/build-dib-os.sh b/xci/scripts/vm/build-dib-os.sh index 2f788006..78eaff2d 100755 --- a/xci/scripts/vm/build-dib-os.sh +++ b/xci/scripts/vm/build-dib-os.sh @@ -7,7 +7,7 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## -set -ex +set -e # This only works on ubuntu hosts lsb_release -i | grep -q -i ubuntu || { echo "This script only works on Ubuntu distros"; exit 1; } diff --git a/xci/scripts/vm/start-new-vm.sh b/xci/scripts/vm/start-new-vm.sh index 807e1c0c..cba1a394 100755 --- a/xci/scripts/vm/start-new-vm.sh +++ b/xci/scripts/vm/start-new-vm.sh @@ -8,7 +8,7 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## -set -ex +set -e lsb_release -i | grep -q -i ubuntu || { echo "This script only works on Ubuntu distros"; exit 1; } @@ -46,7 +46,11 @@ while [[ $_retries -ne 0 ]]; do sleep 60 (( _retries = _retries - 1 )) else - $BASE_PATH/xci/scripts/vm/build-dib-os.sh ${OS} > build.log 2>&1 + if [[ -n ${JENKINS_HOME} ]]; then + $BASE_PATH/xci/scripts/vm/build-dib-os.sh ${OS} 2>&1 | tee build.log + else + $BASE_PATH/xci/scripts/vm/build-dib-os.sh ${OS} > build.log 2>&1 + fi break fi done |