#########################################################################
DRYRUN=""
+YP_ARGS="-s"
while getopts "w:b:e:r:unh" OPTION; do
case ${OPTION} in
;;
n)
DRYRUN="-n"
+ YP_ARGS=""
;;
h)
help_info
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"
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}