X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=scripts%2Fbuild_inf.sh;h=2005dda4e45412cec06a966a3a1202680897af86;hb=3234e3f2871536f02cd07c28aecc7f8a10e7d55f;hp=d180d3d763411a430c89de9a18839cfef23956fc;hpb=652e8c87012907b508baee223f274ff23c668306;p=pti%2Frtp.git diff --git a/scripts/build_inf.sh b/scripts/build_inf.sh index d180d3d..2005dda 100755 --- a/scripts/build_inf.sh +++ b/scripts/build_inf.sh @@ -82,8 +82,11 @@ run_cmd () { DRYRUN="" YP_ARGS="-s" +YOCTO_ONLY="No" +CENTOS_ONLY="No" +DEBIAN_ONLY="Yes" -while getopts "w:b:e:r:unh" OPTION; do +while getopts "w:ycdnh" OPTION; do case ${OPTION} in w) WORKSPACE=`readlink -f ${OPTARG}` @@ -92,6 +95,15 @@ while getopts "w:b:e:r:unh" OPTION; do DRYRUN="-n" YP_ARGS="" ;; + y) + YOCTO_ONLY="Yes" + ;; + c) + CENTOS_ONLY="Yes" + ;; + d) + DEBIAN_ONLY="Yes" + ;; h) help_info exit @@ -120,11 +132,12 @@ prepare_workspace () { msg_step="Create workspace for the multi-os builds" echo_step_start - mkdir -p ${WORKSPACE_YP} ${WORKSPACE_CENTOS} + mkdir -p ${WORKSPACE_YP} ${WORKSPACE_CENTOS} ${WORKSPACE_DEB} echo_info "The following directories are created in your workspace(${WORKSPACE}):" echo_info "For Yocto buid: ${WORKSPACE_YP}" echo_info "For CentOS buid: ${WORKSPACE_CENTOS}" + echo_info "For Debian buid: ${WORKSPACE_DEB}" echo_step_end } @@ -180,12 +193,6 @@ build_centos () { fi } -build_centos_dl () { - # Temp for testing the lftools deploy - mkdir -p ${WORKSPACE_CENTOS}/prj_output/ - wget http://mirror.starlingx.cengn.ca/mirror/starlingx/release/7.0.0/centos/flock/outputs/iso/bootimage.iso -O ${WORKSPACE_CENTOS}/prj_output/inf-image-centos-all-x86-64.iso -} - build_debian () { if [ -z "${DRYRUN}" ]; then msg_step="Debian builds" @@ -196,8 +203,8 @@ build_debian () { run_cmd "Prepare for Debian builds" fi - RUN_CMD="${SCRIPT_DEB} -w ${WORKSPACE_DEB} ${DRYRUN}" - run_cmd "Start Yocto builds" + RUN_CMD="${SCRIPT_DEB} -w ${WORKSPACE_DEB} -m ${DRYRUN}" + run_cmd "Start Debian builds" echo_step_end fi @@ -213,8 +220,15 @@ if [ "$CI" = "true" ]; then get_debug_info fi -build_yocto -#build_centos -build_centos_dl -#build_debian +if [ "${YOCTO_ONLY}" == "Yes" ]; then + build_yocto +elif [ "${CENTOS_ONLY}" == "Yes" ]; then + build_centos +elif [ "${DEBIAN_ONLY}" == "Yes" ]; then + build_debian +else + build_centos + build_yocto + build_debian +fi