Commit 71982b04 authored by wf's avatar wf

add logs

parent 6d1bc204
...@@ -53,7 +53,7 @@ function build_on_vm { ...@@ -53,7 +53,7 @@ function build_on_vm {
fi fi
echo "############################################################" echo "############################################################"
echo "OAI CI VM script" echo "OAI CI VM script build_on_vm"
echo "############################################################" echo "############################################################"
echo "VM_NAME = $VM_NAME" echo "VM_NAME = $VM_NAME"
...@@ -67,8 +67,10 @@ function build_on_vm { ...@@ -67,8 +67,10 @@ function build_on_vm {
echo "This VM type is no longer supported in the pipeline framework" echo "This VM type is no longer supported in the pipeline framework"
return return
fi fi
echo "uvt-kvm list 0000000000000000000"
whoami
IS_VM_ALIVE=`uvt-kvm list | grep -c $VM_NAME` IS_VM_ALIVE=`uvt-kvm list | grep -c $VM_NAME`
echo "uvt-kvm list 0000000000000000000111111111111111111111"
if [ $IS_VM_ALIVE -eq 0 ] if [ $IS_VM_ALIVE -eq 0 ]
then then
...@@ -231,6 +233,9 @@ function build_on_vm { ...@@ -231,6 +233,9 @@ function build_on_vm {
echo "sudo -E daemon --inherit --unsafe --name=build_daemon --chdir=/home/ubuntu/tmp/cmake_targets -o /home/ubuntu/tmp/cmake_targets/log/install-build.txt ./my-vm-build.sh" >> $VM_CMDS echo "sudo -E daemon --inherit --unsafe --name=build_daemon --chdir=/home/ubuntu/tmp/cmake_targets -o /home/ubuntu/tmp/cmake_targets/log/install-build.txt ./my-vm-build.sh" >> $VM_CMDS
fi fi
fi fi
echo "finish $VM_CMDS"
ssh -T -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS ssh -T -o StrictHostKeyChecking=no ubuntu@$VM_IP_ADDR < $VM_CMDS
rm -f $VM_CMDS echo "finish ssh $VM_CMDS"
# rm -f $VM_CMDS
} }
...@@ -80,7 +80,15 @@ function release_vm_create_lock { ...@@ -80,7 +80,15 @@ function release_vm_create_lock {
function create_vm { function create_vm {
echo "############################################################" echo "############################################################"
echo "OAI CI VM script" echo "############################################################"
echo "############################################################"
echo "############################################################"
echo "############################################################"
echo "############################################################"
echo "############################################################"
echo "############################################################"
echo "############################################################"
echo "OAI CI VM script wfwfwfwfwfwfwfwfwfw"
echo "############################################################" echo "############################################################"
echo "VM_NAME = $VM_NAME" echo "VM_NAME = $VM_NAME"
echo "VM_MEMORY = $VM_MEMORY MBytes" echo "VM_MEMORY = $VM_MEMORY MBytes"
......
...@@ -807,6 +807,7 @@ VM_CMDS=${VM_NAME}_cmds.txt ...@@ -807,6 +807,7 @@ VM_CMDS=${VM_NAME}_cmds.txt
ARCHIVES_LOC=${JENKINS_WKSP}/archives/${ARCHIVES_LOC} ARCHIVES_LOC=${JENKINS_WKSP}/archives/${ARCHIVES_LOC}
STATUS=0 STATUS=0
echo "00000000000000000000000000000000000000000"
if [ ${COMMAND[${COMMANDS_NAME[$CREATE_CMD]}]} -eq 1 ] if [ ${COMMAND[${COMMANDS_NAME[$CREATE_CMD]}]} -eq 1 ]
then then
if [[ "$BUILD_OPTIONS" = "" ]] if [[ "$BUILD_OPTIONS" = "" ]]
...@@ -814,9 +815,11 @@ then ...@@ -814,9 +815,11 @@ then
echo "$VM_NAME is not a build variant" echo "$VM_NAME is not a build variant"
exit 0 exit 0
else else
echo "$VM_NAME create_vm 00000000000000000000000000000000000000000"
create_vm create_vm
fi fi
fi fi
echo "11111111111111111111111111111111111111111111111"
if [ ${COMMAND[${COMMANDS_NAME[$BUILD_CMD]}]} -eq 1 ] if [ ${COMMAND[${COMMANDS_NAME[$BUILD_CMD]}]} -eq 1 ]
then then
if [[ "$BUILD_OPTIONS" = "" ]] if [[ "$BUILD_OPTIONS" = "" ]]
...@@ -824,6 +827,7 @@ then ...@@ -824,6 +827,7 @@ then
echo " $VM_NAME is not a build variant" echo " $VM_NAME is not a build variant"
exit 0 exit 0
else else
echo "build_on_vm 11111111111111111111111111111111111111111111111"
build_on_vm build_on_vm
fi fi
if [ $DAEMON -eq 0 ] && [ $STATUS -eq 0 ] if [ $DAEMON -eq 0 ] && [ $STATUS -eq 0 ]
...@@ -838,10 +842,12 @@ then ...@@ -838,10 +842,12 @@ then
echo "$VM_NAME is not a build variant" echo "$VM_NAME is not a build variant"
exit 0 exit 0
else else
echo "wait_on_vm_build 2222222222222222222222222222222222222222222"
wait_on_vm_build wait_on_vm_build
fi fi
if [ $STATUS -eq 0 ] if [ $STATUS -eq 0 ]
then then
echo "check_on_vm_build 3333333333333333333333333333333333333333333"
check_on_vm_build check_on_vm_build
fi fi
fi fi
...@@ -859,6 +865,7 @@ then ...@@ -859,6 +865,7 @@ then
fi fi
ARCHIVES_LOC=${ARCHIVES_LOC}/test ARCHIVES_LOC=${ARCHIVES_LOC}/test
echo "run_test_on_vm 44444444444444444444444444444444444444444444444"
run_test_on_vm run_test_on_vm
fi fi
if [ ${COMMAND[${COMMANDS_NAME[$DESTROY_CMD]}]} -eq 1 ] if [ ${COMMAND[${COMMANDS_NAME[$DESTROY_CMD]}]} -eq 1 ]
......
...@@ -52,8 +52,9 @@ function wait_on_vm_build { ...@@ -52,8 +52,9 @@ function wait_on_vm_build {
echo "This VM type is no longer supported in the pipeline framework" echo "This VM type is no longer supported in the pipeline framework"
return return
fi fi
echo "uvt-kvm list 0000000000000000000000"
IS_VM_ALIVE=`uvt-kvm list | grep -c $VM_NAME` IS_VM_ALIVE=`uvt-kvm list | grep -c $VM_NAME`
echo "uvt-kvm list 1111111111111111111111"
if [ $IS_VM_ALIVE -eq 0 ] if [ $IS_VM_ALIVE -eq 0 ]
then then
......
...@@ -822,8 +822,8 @@ check_install_oai_software() { ...@@ -822,8 +822,8 @@ check_install_oai_software() {
fi fi
install_asn1c_from_source $1 install_asn1c_from_source $1
$SUDO rm -fr /opt/ssh # $SUDO rm -fr /opt/ssh
$SUDO git clone https://gist.github.com/2190472.git /opt/ssh # $SUDO git clone https://gist.github.com/2190472.git /opt/ssh
} }
install_asn1c_from_source(){ install_asn1c_from_source(){
...@@ -832,7 +832,8 @@ install_asn1c_from_source(){ ...@@ -832,7 +832,8 @@ install_asn1c_from_source(){
( (
$SUDO rm -rf /tmp/asn1c $SUDO rm -rf /tmp/asn1c
# GIT_SSL_NO_VERIFY=true git clone https://gitlab.eurecom.fr/oai/asn1c.git /tmp/asn1c # GIT_SSL_NO_VERIFY=true git clone https://gitlab.eurecom.fr/oai/asn1c.git /tmp/asn1c
git clone https://gitlab.eurecom.fr/oai/asn1c.git /tmp/asn1c #git clone https://gitlab.eurecom.fr/oai/asn1c.git /tmp/asn1c
git clone http://git.opensource5g.org/openxg/asn1c.git /tmp/asn1c
cd /tmp/asn1c cd /tmp/asn1c
# better to use a given commit than a branch in case the branch # better to use a given commit than a branch in case the branch
# is updated and requires modifications in the source of OAI # is updated and requires modifications in the source of OAI
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment