CI: importing the stabilized scripts from develop
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
This commit is contained in:
@@ -47,6 +47,36 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stage ("Start VM -- cppcheck") {
|
||||||
|
steps {
|
||||||
|
sh "./ci-scripts/createVM.sh --variant cppcheck --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage ("Start VM -- enb-usrp") {
|
||||||
|
steps {
|
||||||
|
sh "./ci-scripts/createVM.sh --variant enb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage ("Start VM -- phy-sim") {
|
||||||
|
steps {
|
||||||
|
sh "./ci-scripts/createVM.sh --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage ("Start VM -- gnb-usrp") {
|
||||||
|
steps {
|
||||||
|
sh "./ci-scripts/createVM.sh --variant gnb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage ("Start VM -- nu-ue-usrp") {
|
||||||
|
steps {
|
||||||
|
sh "./ci-scripts/createVM.sh --variant nu-ue-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
stage ("Variant Builds") {
|
stage ("Variant Builds") {
|
||||||
parallel {
|
parallel {
|
||||||
stage ("Analysis with cppcheck") {
|
stage ("Analysis with cppcheck") {
|
||||||
|
|||||||
+56
-16
@@ -24,12 +24,14 @@ function usage {
|
|||||||
echo " --workspace #### OR -ws ####"
|
echo " --workspace #### OR -ws ####"
|
||||||
echo " Specify the workspace."
|
echo " Specify the workspace."
|
||||||
echo ""
|
echo ""
|
||||||
echo " --variant enb-usrp OR -v1"
|
echo " --variant enb-usrp OR -v1"
|
||||||
echo " --variant basic-sim OR -v2"
|
echo " --variant basic-sim OR -v2"
|
||||||
echo " --variant phy-sim OR -v3"
|
echo " --variant phy-sim OR -v3"
|
||||||
echo " --variant cppcheck OR -v4"
|
echo " --variant cppcheck OR -v4"
|
||||||
echo " --variant gnb-usrp OR -v5"
|
echo " --variant gnb-usrp OR -v5"
|
||||||
echo " --variant nu-ue-usrp OR -v6"
|
echo " --variant nu-ue-usrp OR -v6"
|
||||||
|
echo " --variant enb-ethernet OR -v7"
|
||||||
|
echo " --variant ue-ethernet OR -v8"
|
||||||
echo " Specify the variant to build."
|
echo " Specify the variant to build."
|
||||||
echo ""
|
echo ""
|
||||||
echo " --keep-vm-alive OR -k"
|
echo " --keep-vm-alive OR -k"
|
||||||
@@ -44,12 +46,14 @@ function variant_usage {
|
|||||||
echo "OAI VM Build Check script"
|
echo "OAI VM Build Check script"
|
||||||
echo " Original Author: Raphael Defosseux"
|
echo " Original Author: Raphael Defosseux"
|
||||||
echo ""
|
echo ""
|
||||||
echo " --variant enb-usrp OR -v1"
|
echo " --variant enb-usrp OR -v1"
|
||||||
echo " --variant basic-sim OR -v2"
|
echo " --variant basic-sim OR -v2"
|
||||||
echo " --variant phy-sim OR -v3"
|
echo " --variant phy-sim OR -v3"
|
||||||
echo " --variant cppcheck OR -v4"
|
echo " --variant cppcheck OR -v4"
|
||||||
echo " --variant gnb-usrp OR -v5"
|
echo " --variant gnb-usrp OR -v5"
|
||||||
echo " --variant nu-ue-usrp OR -v6"
|
echo " --variant nu-ue-usrp OR -v6"
|
||||||
|
echo " --variant enb-ethernet OR -v7"
|
||||||
|
echo " --variant ue-ethernet OR -v8"
|
||||||
echo ""
|
echo ""
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -148,6 +152,22 @@ case $key in
|
|||||||
BUILD_OPTIONS="--nrUE -w USRP"
|
BUILD_OPTIONS="--nrUE -w USRP"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
-v7)
|
||||||
|
VM_NAME=ci-enb-ethernet
|
||||||
|
ARCHIVES_LOC=enb_eth
|
||||||
|
LOG_PATTERN=.Rel14.txt
|
||||||
|
NB_PATTERN_FILES=6
|
||||||
|
BUILD_OPTIONS="--eNB -t ETHERNET --noS1"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-v8)
|
||||||
|
VM_NAME=ci-ue-ethernet
|
||||||
|
ARCHIVES_LOC=ue_eth
|
||||||
|
LOG_PATTERN=.Rel14.txt
|
||||||
|
NB_PATTERN_FILES=6
|
||||||
|
BUILD_OPTIONS="--UE -t ETHERNET --noS1"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
--variant)
|
--variant)
|
||||||
variant="$2"
|
variant="$2"
|
||||||
case $variant in
|
case $variant in
|
||||||
@@ -193,6 +213,20 @@ case $key in
|
|||||||
NB_PATTERN_FILES=4
|
NB_PATTERN_FILES=4
|
||||||
BUILD_OPTIONS="--nrUE -w USRP"
|
BUILD_OPTIONS="--nrUE -w USRP"
|
||||||
;;
|
;;
|
||||||
|
enb-ethernet)
|
||||||
|
VM_NAME=ci-enb-ethernet
|
||||||
|
ARCHIVES_LOC=enb_eth
|
||||||
|
LOG_PATTERN=.Rel14.txt
|
||||||
|
NB_PATTERN_FILES=6
|
||||||
|
BUILD_OPTIONS="--eNB -t ETHERNET --noS1"
|
||||||
|
;;
|
||||||
|
ue-ethernet)
|
||||||
|
VM_NAME=ci-ue-ethernet
|
||||||
|
ARCHIVES_LOC=ue_eth
|
||||||
|
LOG_PATTERN=.Rel14.txt
|
||||||
|
NB_PATTERN_FILES=6
|
||||||
|
BUILD_OPTIONS="--UE -t ETHERNET --noS1"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo ""
|
echo ""
|
||||||
echo "Syntax Error: Invalid Variant option -> $variant"
|
echo "Syntax Error: Invalid Variant option -> $variant"
|
||||||
@@ -240,10 +274,16 @@ echo "JENKINS_WKSP = $JENKINS_WKSP"
|
|||||||
echo "ARCHIVES_LOC = $ARCHIVES_LOC"
|
echo "ARCHIVES_LOC = $ARCHIVES_LOC"
|
||||||
echo "BUILD_OPTIONS = $BUILD_OPTIONS"
|
echo "BUILD_OPTIONS = $BUILD_OPTIONS"
|
||||||
|
|
||||||
echo "############################################################"
|
IS_VM_ALIVE=`uvt-kvm list | grep -c $VM_NAME`
|
||||||
echo "Creating VM ($VM_NAME) on Ubuntu Cloud Image base"
|
|
||||||
echo "############################################################"
|
if [ $IS_VM_ALIVE -eq 0 ]
|
||||||
uvt-kvm create $VM_NAME release=xenial --memory 2048 --cpu 4 --unsafe-caching --template ci-scripts/template-host.xml
|
then
|
||||||
|
echo "############################################################"
|
||||||
|
echo "Creating VM ($VM_NAME) on Ubuntu Cloud Image base"
|
||||||
|
echo "############################################################"
|
||||||
|
uvt-kvm create $VM_NAME release=xenial --memory 2048 --cpu 4 --unsafe-caching --template ci-scripts/template-host.xml
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Waiting for VM to be started"
|
echo "Waiting for VM to be started"
|
||||||
uvt-kvm wait $VM_NAME --insecure
|
uvt-kvm wait $VM_NAME --insecure
|
||||||
|
|
||||||
|
|||||||
Executable
+185
@@ -0,0 +1,185 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
function usage {
|
||||||
|
echo "OAI VM Creation script"
|
||||||
|
echo " Original Author: Raphael Defosseux"
|
||||||
|
echo " Requirements:"
|
||||||
|
echo " -- uvtool uvtool-libvirt apt-cacher"
|
||||||
|
echo " -- xenial image already synced"
|
||||||
|
echo " Default:"
|
||||||
|
echo " -- eNB with USRP"
|
||||||
|
echo ""
|
||||||
|
echo "Usage:"
|
||||||
|
echo "------"
|
||||||
|
echo " createVM.sh [OPTIONS]"
|
||||||
|
echo ""
|
||||||
|
echo "Options:"
|
||||||
|
echo "--------"
|
||||||
|
echo " --job-name #### OR -jn ####"
|
||||||
|
echo " Specify the name of the Jenkins job."
|
||||||
|
echo ""
|
||||||
|
echo " --build-id #### OR -id ####"
|
||||||
|
echo " Specify the build ID of the Jenkins job."
|
||||||
|
echo ""
|
||||||
|
echo " --variant enb-usrp OR -v1"
|
||||||
|
echo " --variant basic-sim OR -v2"
|
||||||
|
echo " --variant phy-sim OR -v3"
|
||||||
|
echo " --variant cppcheck OR -v4"
|
||||||
|
echo " --variant gnb-usrp OR -v5"
|
||||||
|
echo " --variant nu-ue-usrp OR -v6"
|
||||||
|
echo " --variant enb-ethernet OR -v7"
|
||||||
|
echo " --variant ue-ethernet OR -v8"
|
||||||
|
echo " Specify the variant to build."
|
||||||
|
echo ""
|
||||||
|
echo " --help OR -h"
|
||||||
|
echo " Print this help message."
|
||||||
|
echo ""
|
||||||
|
}
|
||||||
|
|
||||||
|
function variant_usage {
|
||||||
|
echo "OAI VM Build Check script"
|
||||||
|
echo " Original Author: Raphael Defosseux"
|
||||||
|
echo ""
|
||||||
|
echo " --variant enb-usrp OR -v1"
|
||||||
|
echo " --variant basic-sim OR -v2"
|
||||||
|
echo " --variant phy-sim OR -v3"
|
||||||
|
echo " --variant cppcheck OR -v4"
|
||||||
|
echo " --variant gnb-usrp OR -v5"
|
||||||
|
echo " --variant nu-ue-usrp OR -v6"
|
||||||
|
echo " --variant enb-ethernet OR -v7"
|
||||||
|
echo " --variant ue-ethernet OR -v8"
|
||||||
|
echo ""
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ $# -lt 1 ] || [ $# -gt 6 ]
|
||||||
|
then
|
||||||
|
echo "Syntax Error: not the correct number of arguments"
|
||||||
|
echo ""
|
||||||
|
usage
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
VM_TEMPLATE=ci-
|
||||||
|
JOB_NAME=XX
|
||||||
|
BUILD_ID=XX
|
||||||
|
VM_NAME=ci-enb-usrp
|
||||||
|
|
||||||
|
while [[ $# -gt 0 ]]
|
||||||
|
do
|
||||||
|
key="$1"
|
||||||
|
|
||||||
|
case $key in
|
||||||
|
-h|--help)
|
||||||
|
shift
|
||||||
|
usage
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
-jn|--job-name)
|
||||||
|
JOB_NAME="$2"
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-id|--build-id)
|
||||||
|
BUILD_ID="$2"
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-v1)
|
||||||
|
VM_NAME=ci-enb-usrp
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-v2)
|
||||||
|
VM_NAME=ci-basic-sim
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-v3)
|
||||||
|
VM_NAME=ci-phy-sim
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-v4)
|
||||||
|
VM_NAME=ci-cppcheck
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-v5)
|
||||||
|
VM_NAME=ci-gnb-usrp
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-v6)
|
||||||
|
VM_NAME=ci-ue-nr-usrp
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-v7)
|
||||||
|
VM_NAME=ci-enb-ethernet
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-v8)
|
||||||
|
VM_NAME=ci-ue-ethernet
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
--variant)
|
||||||
|
variant="$2"
|
||||||
|
case $variant in
|
||||||
|
enb-usrp)
|
||||||
|
VM_NAME=ci-enb-usrp
|
||||||
|
;;
|
||||||
|
basic-sim)
|
||||||
|
VM_NAME=ci-basic-sim
|
||||||
|
;;
|
||||||
|
phy-sim)
|
||||||
|
VM_NAME=ci-phy-sim
|
||||||
|
;;
|
||||||
|
cppcheck)
|
||||||
|
VM_NAME=ci-cppcheck
|
||||||
|
;;
|
||||||
|
gnb-usrp)
|
||||||
|
VM_NAME=ci-gnb-usrp
|
||||||
|
;;
|
||||||
|
nu-ue-usrp)
|
||||||
|
VM_NAME=ci-ue-nr-usrp
|
||||||
|
;;
|
||||||
|
enb-ethernet)
|
||||||
|
VM_NAME=ci-enb-ethernet
|
||||||
|
;;
|
||||||
|
ue-ethernet)
|
||||||
|
VM_NAME=ci-ue-ethernet
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo ""
|
||||||
|
echo "Syntax Error: Invalid Variant option -> $variant"
|
||||||
|
echo ""
|
||||||
|
variant_usage
|
||||||
|
exit 1
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Syntax Error: unknown option: $key"
|
||||||
|
echo ""
|
||||||
|
usage
|
||||||
|
exit 1
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ "$JOB_NAME" == "XX" ] || [ "$BUILD_ID" == "XX" ]
|
||||||
|
then
|
||||||
|
VM_TEMPLATE=ci-
|
||||||
|
else
|
||||||
|
VM_TEMPLATE=${JOB_NAME}-b${BUILD_ID}-
|
||||||
|
fi
|
||||||
|
|
||||||
|
VM_NAME=`echo $VM_NAME | sed -e "s#ci-#$VM_TEMPLATE#"`
|
||||||
|
VM_CMDS=${VM_NAME}_cmds.txt
|
||||||
|
|
||||||
|
echo "VM_NAME = $VM_NAME"
|
||||||
|
|
||||||
|
echo "############################################################"
|
||||||
|
echo "Creating VM ($VM_NAME) on Ubuntu Cloud Image base"
|
||||||
|
echo "############################################################"
|
||||||
|
uvt-kvm create $VM_NAME release=xenial --memory 2048 --cpu 4 --unsafe-caching --template ci-scripts/template-host.xml
|
||||||
|
echo "Waiting for VM to be started"
|
||||||
|
uvt-kvm wait $VM_NAME --insecure
|
||||||
|
|
||||||
|
VM_IP_ADDR=`uvt-kvm ip $VM_NAME`
|
||||||
|
echo "$VM_NAME has for IP addr = $VM_IP_ADDR"
|
||||||
|
exit 0
|
||||||
@@ -232,6 +232,10 @@ function sca_summary_table_footer {
|
|||||||
echo " <th>Total</th>" >> ./build_results.html
|
echo " <th>Total</th>" >> ./build_results.html
|
||||||
echo " <th>Unknown</th>" >> ./build_results.html
|
echo " <th>Unknown</th>" >> ./build_results.html
|
||||||
echo " <th>Unknown</th>" >> ./build_results.html
|
echo " <th>Unknown</th>" >> ./build_results.html
|
||||||
|
if [ -f ccp_error_cnt.txt ]
|
||||||
|
then
|
||||||
|
rm -f ccp_error_cnt.txt
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
echo " </tr>" >> ./build_results.html
|
echo " </tr>" >> ./build_results.html
|
||||||
echo " </table>" >> ./build_results.html
|
echo " </table>" >> ./build_results.html
|
||||||
@@ -528,6 +532,30 @@ then
|
|||||||
summary_table_footer
|
summary_table_footer
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -f archives/enb_eth/lte-softmodem-nos1.Rel14.txt ]
|
||||||
|
then
|
||||||
|
summary_table_header "OAI Build eNB -- ETHERNET transport option"
|
||||||
|
summary_table_row "LTE SoftModem w/o S1 - Release 14" ./archives/enb_eth/lte-softmodem-nos1.Rel14.txt "Built target lte-softmodem" ./enb_eth_row1.html
|
||||||
|
summary_table_row "Coding - Release 14" ./archives/enb_eth/coding.Rel14.txt "Built target coding" ./enb_eth_row2.html
|
||||||
|
summary_table_row "OAI ETHERNET transport - Release 14" ./archives/enb_eth/oai_eth_transpro.Rel14.txt "Built target oai_eth_transpro" ./enb_eth_row3.html
|
||||||
|
summary_table_row "Parameters Lib Config - Release 14" ./archives/enb_eth/params_libconfig.Rel14.txt "Built target params_libconfig" ./enb_eth_row4.html
|
||||||
|
summary_table_row "RB Tools - Release 14" ./archives/enb_eth/rb_tool.Rel14.txt "Built target rb_tool" ./enb_eth_row5.html
|
||||||
|
summary_table_row "NAS Mesh - Release 14" ./archives/enb_eth/nasmesh.Rel14.txt "Built target nasmesh" ./enb_eth_row6.html
|
||||||
|
summary_table_footer
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f archives/ue_eth/lte-uesoftmodem-nos1.Rel14.txt ]
|
||||||
|
then
|
||||||
|
summary_table_header "OAI Build UE -- ETHERNET transport option"
|
||||||
|
summary_table_row "LTE UE SoftModem w/o S1 - Release 14" ./archives/ue_eth/lte-uesoftmodem-nos1.Rel14.txt "Built target lte-uesoftmodem" ./ue_eth_row1.html
|
||||||
|
summary_table_row "Coding - Release 14" ./archives/ue_eth/coding.Rel14.txt "Built target coding" ./ue_eth_row2.html
|
||||||
|
summary_table_row "OAI ETHERNET transport - Release 14" ./archives/ue_eth/oai_eth_transpro.Rel14.txt "Built target oai_eth_transpro" ./ue_eth_row3.html
|
||||||
|
summary_table_row "Parameters Lib Config - Release 14" ./archives/ue_eth/params_libconfig.Rel14.txt "Built target params_libconfig" ./ue_eth_row4.html
|
||||||
|
summary_table_row "RB Tools - Release 14" ./archives/ue_eth/rb_tool.Rel14.txt "Built target rb_tool" ./ue_eth_row5.html
|
||||||
|
summary_table_row "NAS Mesh - Release 14" ./archives/ue_eth/nasmesh.Rel14.txt "Built target nasmesh" ./ue_eth_row6.html
|
||||||
|
summary_table_footer
|
||||||
|
fi
|
||||||
|
|
||||||
echo " <h3>Details</h3>" >> ./build_results.html
|
echo " <h3>Details</h3>" >> ./build_results.html
|
||||||
|
|
||||||
for DETAILS_TABLE in `ls ./enb_usrp_row*.html`
|
for DETAILS_TABLE in `ls ./enb_usrp_row*.html`
|
||||||
@@ -550,7 +578,15 @@ for DETAILS_TABLE in `ls ./nrue_usrp_row*.html`
|
|||||||
do
|
do
|
||||||
cat $DETAILS_TABLE >> ./build_results.html
|
cat $DETAILS_TABLE >> ./build_results.html
|
||||||
done
|
done
|
||||||
rm -f ./enb_usrp_row*.html ./basic_sim_row*.html ./phy_sim_row*.html ./gnb_usrp_row*.html ./nrue_usrp_row*.html
|
for DETAILS_TABLE in `ls ./enb_eth_row*.html`
|
||||||
|
do
|
||||||
|
cat $DETAILS_TABLE >> ./build_results.html
|
||||||
|
done
|
||||||
|
for DETAILS_TABLE in `ls ./ue_eth_row*.html`
|
||||||
|
do
|
||||||
|
cat $DETAILS_TABLE >> ./build_results.html
|
||||||
|
done
|
||||||
|
rm -f ./enb_usrp_row*.html ./basic_sim_row*.html ./phy_sim_row*.html ./gnb_usrp_row*.html ./nrue_usrp_row*.html ./enb_eth_row*.html ./ue_eth_row*.html
|
||||||
|
|
||||||
echo "</body>" >> ./build_results.html
|
echo "</body>" >> ./build_results.html
|
||||||
echo "</html>" >> ./build_results.html
|
echo "</html>" >> ./build_results.html
|
||||||
|
|||||||
Reference in New Issue
Block a user