Commit f2998b12 authored by Luhan Wang's avatar Luhan Wang

add create VM

parent b253c1a1
......@@ -55,11 +55,11 @@ pipeline {
}
stages {
stage ("Build Stage") {
stage ("Create VM") {
steps {
script {
echo "Hello World, Compile main.c"
sh 'gcc ./main.c'
echo "create an VM for testing"
sh './createVM.sh'
}
}
}
......
#!/bin/bash
ALL_VMS=`uvt-kvm list`
VM_NAME="vmtest"
echo $ALL_VMS
result=$(echo $ALL_VMS | grep "${VM_NAME}")
echo $result
if [ "$result" != "" ];then
uvt-kvm destroy $VM_NAME ## if exist testing vm, then remove it
fi
##创建一个虚拟机用于承载测试;
uvt-kvm create vmtest release=bionic --memory 8192 --disk 80 --cpu 4 --ssh-public-key-file ~/.ssh/id_rsa.pub
uvt-kvm wait $VM_NAME
echo "successfully created VM, name is vmtest"
\ No newline at end of file
#!/bin/bash
sudo apt install git -y --force-yes
echo "successfully installed git..."
if [ -d "openxg-5gcs-release" ]; then
rm -rf openxg-5gcs-release
fi
git clone --branch master http://git.opensource5g.org/openxg/openxg-5gcs-release.git
echo "successfully cloned project"
cd openxg-5gcs-release
\ No newline at end of file
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