X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=scripts%2Fbuild_inf.sh;h=b5f4846e90e4f0372a9034b738b24db8956b0150;hb=59cfe05e26d58bbb98620671da8bf26343d76a88;hp=e8bd658378f0ddaf31c6541bea0866993764541a;hpb=cb89a81be859849eaa5cdcecf10697d101140059;p=pti%2Frtp.git diff --git a/scripts/build_inf.sh b/scripts/build_inf.sh index e8bd658..b5f4846 100755 --- a/scripts/build_inf.sh +++ b/scripts/build_inf.sh @@ -80,6 +80,7 @@ echo_cmd () { ######################################################################### DRYRUN="" +YP_ARGS="-s" while getopts "w:b:e:r:unh" OPTION; do case ${OPTION} in @@ -88,6 +89,7 @@ while getopts "w:b:e:r:unh" OPTION; do ;; n) DRYRUN="-n" + YP_ARGS="" ;; h) help_info @@ -108,6 +110,7 @@ WORKSPACE_YP=${WORKSPACE}/workspace_yocto WORKSPACE_CENTOS=${WORKSPACE}/workspace_centos SCRIPT_YP=${SCRIPTS_DIR}/build_inf_yocto/build_inf_yocto.sh SCRIPT_CENTOS=${SCRIPTS_DIR}/build_inf_centos/build_inf_centos.sh +SCRIPT_CENTOS_PRE=${SCRIPTS_DIR}/build_inf_centos/build_inf_prepare_jenkins.sh prepare_workspace () { msg_step="Create workspace for the multi-os builds" @@ -122,16 +125,46 @@ 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} + if [ "$CI" = "true" ]; then + ${SCRIPT_CENTOS_PRE} -w ${WORKSPACE_CENTOS} || true + fi + ${SCRIPT_CENTOS} -w ${WORKSPACE_CENTOS} ${DRYRUN} || true fi + +${SCRIPT_YP} -w ${WORKSPACE_YP} ${DRYRUN} ${YP_ARGS}