SRC_ORAN_URL="https://gerrit.o-ran-sc.org/r/pti/rtp"
SCRIPTS_DIR=$(dirname $(readlink -f $0))
+SCRIPTS_NAME=$(basename $0)
TIMESTAMP=`date +"%Y%m%d_%H%M%S"`
#########################################################################
help_info () {
cat << ENDHELP
Usage:
-$(basename $0) [-w WORKSPACE_DIR] [-n] [-u] [-h]
+${SCRIPTS_NAME} [-w WORKSPACE_DIR] [-n] [-u] [-h]
where:
-w WORKSPACE_DIR is the path for the project
-n dry-run only for bitbake
echo_step_start() {
[ -n "$1" ] && msg_step=$1
echo "#########################################################################################"
- echo "## STEP START: ${msg_step}"
+ echo "## ${SCRIPTS_NAME} - STEP START: ${msg_step}"
echo "#########################################################################################"
}
echo_step_end() {
[ -n "$1" ] && msg_step=$1
echo "#########################################################################################"
- echo "## STEP END: ${msg_step}"
+ echo "## ${SCRIPTS_NAME} - STEP END: ${msg_step}"
echo "#########################################################################################"
echo
}
SRC_META_PATCHES=${SCRIPTS_DIR}/meta-patches
+ISO_INF_COS=inf-image-centos-all-x86-64.iso
+
prepare_workspace () {
msg_step="Create workspace for the CentOS build"
echo_step_start
${MY_REPO_ROOT_DIR}/stx-tools/toCOPY/populate_downloads.sh ${STX_MIRROR_DIR}/stx-6.0
}
-# To be removed:
-# This build script can not successfully build out the image yet,
-# get the upstream image temporary so we can still test the CI job to
-# upload the image to nexus
-ISO_STX_COS=bootimage.iso
-ISO_UP_VER=6.0.0
-ISO_UP=http://mirror.starlingx.cengn.ca/mirror/starlingx/release/${ISO_UP_VER}/centos/flock/outputs/iso/${ISO_STX_COS}
-ISO_INF_COS=inf-image-centos-all-x86-64.iso
-
-build_image_rm () {
- echo_step_start "Build CentOS images: To be removed"
-
- mkdir -p ${STX_PRJ_OUTPUT}
- cd ${STX_PRJ_OUTPUT}
- wget -q ${ISO_UP} -O ${ISO_INF_COS}
- ls -lh ${STX_PRJ_OUTPUT}/${ISO_INF_COS}
-
- echo_step_end
-
- echo_info "Build succeeded, you can get the image in ${STX_PRJ_OUTPUT}/${ISO_INF_COS}"
-}
-
build_image () {
echo_step_start "Build CentOS images"
RUN_CMD="build-pkgs --build-avoidance"
run_cmd "Build pkgs"
+ # The first run always fail
+ build-iso || sleep 60
+
RUN_CMD="build-iso"
run_cmd "Build ISO image"
- cp ${MY_BUILD_DIR}/export/bootimage.iso ${STX_PRJ_OUTPUT}/${ISO_INF_COS}
+ cp -f ${MY_BUILD_DIR}/export/bootimage.iso ${STX_PRJ_OUTPUT}/${ISO_INF_COS}
echo_step_end
echo_info "Build succeeded, you can get the image in ${STX_PRJ_OUTPUT}/${ISO_INF_COS}"
}
-
#########################################################################
# Main process
#########################################################################
repo_init_sync
patch_src
populate_dl
-#build_image_rm
build_image