From ecb441b13b89fdcf663f04d48b090f555f544c1e Mon Sep 17 00:00:00 2001 From: Jackie Huang Date: Wed, 18 May 2022 09:41:42 +0800 Subject: [PATCH] build_inf.sh: add debug info for CI jenkins build Issue-ID: INF-274 Signed-off-by: Jackie Huang Change-Id: Ic6f08625f924881ab53b0c4c08e777d1cc2865fc --- scripts/build_inf.sh | 33 +++++++++++++++++++++++++--- scripts/build_inf_centos/build_inf_centos.sh | 2 +- 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/scripts/build_inf.sh b/scripts/build_inf.sh index e8bd658..797aeae 100755 --- a/scripts/build_inf.sh +++ b/scripts/build_inf.sh @@ -122,16 +122,43 @@ prepare_workspace () { echo_step_end } +# debug for CI Jenkins build +get_debug_info () { + msg_step="Get debug info for CI Jenkins build" + echo_step_start + + echo_info "=== Get env ===" + env + echo_info "===============" + + set -x + df -h + groups + uname -a + cat /etc/*release + lscpu + free -h + rpm -qa|grep mock + mock --debug-config + docker version + set +x + + echo_step_end +} + ######################################################################### # Main process ######################################################################### prepare_workspace - -${SCRIPT_CENTOS} -w ${WORKSPACE_CENTOS} ${DRYRUN} +if [ "$CI" = "true" ]; then + get_debug_info +fi # dry-run is not supported yet for CentOS build if [ -z "${DRYRUN}" ]; then - ${SCRIPT_YP} -w ${WORKSPACE_YP} ${DRYRUN} + ${SCRIPT_CENTOS} -w ${WORKSPACE_CENTOS} ${DRYRUN} fi + +${SCRIPT_YP} -w ${WORKSPACE_YP} ${DRYRUN} diff --git a/scripts/build_inf_centos/build_inf_centos.sh b/scripts/build_inf_centos/build_inf_centos.sh index ddb29f3..112a81b 100755 --- a/scripts/build_inf_centos/build_inf_centos.sh +++ b/scripts/build_inf_centos/build_inf_centos.sh @@ -289,7 +289,7 @@ build_image () { mkdir -p ${STX_PRJ_OUTPUT} cd ${STX_PRJ_OUTPUT} - wget ${ISO_UP} -O ${ISO_INF_COS} + wget -q ${ISO_UP} -O ${ISO_INF_COS} echo_step_end -- 2.16.6