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>
# 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; }
# 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; }
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