Commit c66538be authored by kharade's avatar kharade

Merge branch 'develop' of https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-upf-vpp...

Merge branch 'develop' of https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-upf-vpp into build_time_optimise
parents 06cab41e a07e80f6
......@@ -166,7 +166,7 @@ compilations() {
echo_info "Compilation log for $1 is here: $dlog/$2.txt"
cd $OPENAIRCN_DIR/$1/
{
make build
make build-release | tee $dlog/$2.txt
if grep -q "@@ Installing vpp @@" "$dlog/$2.txt" ; then
echo_success "##### VPP Compiled Successfully #####"
else
......
......@@ -51,15 +51,11 @@ check_install_vpp_upf_deps() {
check_supported_distribution
[[ $? -ne 0 ]] && return $?
# prevent lock on /var/lib/dpkg/lock
if [[ $OS_DISTRO == "ubuntu" ]]; then
#$SUDO systemctl mask apt-daily.service
#$SUDO systemctl mask apt-daily.timer
#$SUDO systemctl mask apt-daily-upgrade.service
#$SUDO systemctl mask apt-daily-upgrade.timer
$SUDO sed -i 's/1/0/g' /etc/apt/apt.conf.d/10periodic
if [[ $OS_RELEASE == "20.04" ]]; then
TZ=Europe/Paris
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
fi
# Compilers, generators, ...
if [[ $OS_DISTRO == "ubuntu" ]]; then
PACKAGE_LIST="\
......@@ -83,7 +79,7 @@ check_install_vpp_upf_deps() {
echo_fatal "$OS_DISTRO is not a supported distribution."
fi
echo "Install build tools"
$SUDO $INSTALLER install $OPTION $PACKAGE_LIST
$SUDO $INSTALLER update && $SUDO $INSTALLER install $OPTION $PACKAGE_LIST
ret=$?;[[ $ret -ne 0 ]] && return $ret
check_install_vpp_upf_source_deps
......@@ -92,29 +88,33 @@ check_install_vpp_upf_deps() {
}
#-------------------------------------------------------------------------------
check_install_vpp_upf_deps() {
echo_info "Cloning fdio VPP $OPENAIRCN_DIR/"
check_install_vpp_upf_source_deps() {
if [ -d "$OPENAIRCN_DIR/vpp" ]; then
echo_error "clone failed : - vpp source is already present at $OPENAIRCN_DIR/... use option -w to wipe out vpp source"
echo_error "Warning :- vpp source is already present at $OPENAIRCN_DIR/... use option -w to wipe out vpp source"
fi
install_dep
}
#-------------------------------------------------------------------------------
install_dep(){
if [ -d "$OPENAIRCN_DIR/vpp" ]; then
remove_vpp_source
fi
GIT_URL=https://github.com/fdio/vpp.git
GIT_BRANCH=stable/2101
pushd $OPENAIRCN_DIR/
echo_info "Cloning fdio VPP $OPENAIRCN_DIR/"
git clone -b $GIT_BRANCH $GIT_URL
# echo "APT::Get::Assume-Yes "true";" >> /etc/apt/apt.conf.d/90forceyes
# echo "APT::Get::force-yes "true";" >> /etc/apt/apt.conf.d/90forceyes
cd vpp && make install-dep
$SUDO rm -rf /etc/apt/apt.conf.d/90forceyes
$SUDO sh -c 'echo "APT::Get::Assume-Yes "true";" >> /etc/apt/apt.conf.d/90forceyes'
$SUDO sh -c 'echo "APT::Get::force-yes "true";" >> /etc/apt/apt.conf.d/90forceyes'
make install-dep -C vpp
return 0
}
remove_vpp_source(){
rm -rf $OPENAIRCN_DIR/vpp/
echo_fatal "Removed vpp source $OPENAIRCN_DIR/vpp"
echo_error "Removed vpp source $OPENAIRCN_DIR/vpp"
}
#-------------------------------------------------------------------------------
......@@ -146,5 +146,24 @@ vpp_upf_init(){
cp $OPENAIRCN_DIR/scripts/upf_conf/* $OPENAIRCN_DIR/vpp
cp $OPENAIRCN_DIR/scripts/run.sh $OPENAIRCN_DIR/vpp
echo_info "Installing VPP"
sudo cp -rf $OPENAIRCN_DIR/vpp/build-root/install-vpp_debug-native/vpp/lib/ /usr/lib/x86_64-linux-gnu/vpp_plugins/
# Copying binaries
$SUDO cp -rf $OPENAIRCN_DIR/vpp/build-root/install-vpp-native/vpp/bin/vpp /bin/
$SUDO cp -rf $OPENAIRCN_DIR/vpp/build-root/install-vpp-native/vpp/bin/vppctl /bin/
echo_info "Copied binaries to /bin"
# Copying necessary libraries
$SUDO cp -rf $OPENAIRCN_DIR/vpp/build-root/install-vpp-native/vpp/lib/vpp_plugins /usr/lib/x86_64-linux-gnu/vpp_plugins/
$SUDO cp -rf $OPENAIRCN_DIR/vpp/build-root/install-vpp-native/vpp/lib/libvppinfra.so.21.01.1 /usr/lib/x86_64-linux-gnu/
$SUDO cp -rf $OPENAIRCN_DIR/vpp/build-root/install-vpp-native/vpp/lib/libvnet.so.21.01.1 /usr/lib/x86_64-linux-gnu/
$SUDO cp -rf $OPENAIRCN_DIR/vpp/build-root/install-vpp-native/vpp/lib/libvlibmemory.so.21.01.1 /usr/lib/x86_64-linux-gnu/
$SUDO cp -rf $OPENAIRCN_DIR/vpp/build-root/install-vpp-native/vpp/lib/libvlib.so.21.01.1 /usr/lib/x86_64-linux-gnu/
$SUDO cp -rf $OPENAIRCN_DIR/vpp/build-root/install-vpp-native/vpp/lib/libsvm.so.21.01.1 /usr/lib/x86_64-linux-gnu/
$SUDO cp -rf $OPENAIRCN_DIR/vpp/build-root/install-vpp-native/vpp/lib/libnat.so.21.01.1 /usr/lib/x86_64-linux-gnu/
$SUDO ldconfig
echo_info "Copied libraries to /usr/lib/x86_64-linux-gnu/"
if [ $(getent group vpp) ]; then
echo "group vpp not added since it already exists"
else
$SUDO groupadd vpp
echo "group vpp added"
fi
}
......@@ -142,7 +142,6 @@ function main()
mkdir -m 777 -p $dext
if [ $var_check_install_deps -gt 0 ];then
disable_ipv6
check_install_vpp_upf_deps $force $debug
if [[ $? -ne 0 ]]; then
echo_error "Error: VPP UPF deps installation failed"
......
......@@ -230,21 +230,23 @@ pipeline {
steps {
lock(params.SanityCheckDockerContainers) {
script {
sh 'python3 ./ci-scripts/sanityCheckDeployment.py --mode Deploy --service mysql'
// NRF SHALL BE DEPLOYED BEFORE UPF-VPP
sh 'python3 ./ci-scripts/sanityCheckDeployment.py --mode Deploy --service oai-nrf'
sh 'python3 ./ci-scripts/sanityCheckDeployment.py --mode Deploy --service vpp-upf --upf_tag ' + upf_tag
// SMF is dependant on AMF and EXT-DN: they will be deploy as well
sh 'python3 ./ci-scripts/sanityCheckDeployment.py --mode Deploy --service oai-smf'
// GNB SIM as RAN emulator
sh 'python3 ./ci-scripts/sanityCheckDeployment.py --mode Deploy --docker_compose docker-compose-gnbsim.yaml --service gnbsim-vpp'
gitlabCommitStatus(name: "Sanity Check Deployment") {
sh 'python3 ./ci-scripts/sanityCheckDeployment.py --mode Deploy --service mysql'
// NRF SHALL BE DEPLOYED BEFORE UPF-VPP
sh 'python3 ./ci-scripts/sanityCheckDeployment.py --mode Deploy --service oai-nrf'
sh 'python3 ./ci-scripts/sanityCheckDeployment.py --mode Deploy --service vpp-upf --upf_tag ' + upf_tag
// SMF is dependant on AMF and EXT-DN: they will be deploy as well
sh 'python3 ./ci-scripts/sanityCheckDeployment.py --mode Deploy --service oai-smf'
// GNB SIM as RAN emulator
sh 'python3 ./ci-scripts/sanityCheckDeployment.py --mode Deploy --docker_compose docker-compose-gnbsim.yaml --service gnbsim-vpp'
// Check if deployment is OK
sh 'python3 ./ci-scripts/sanityCheckDeployment.py --mode Check --service all'
// Check if deployment is OK
sh 'python3 ./ci-scripts/sanityCheckDeployment.py --mode Check --service all'
// Undeploy once OK
sh 'python3 ./ci-scripts/sanityCheckDeployment.py --mode UnDeploy --docker_compose docker-compose-gnbsim.yaml --service gnbsim-vpp'
sh 'python3 ./ci-scripts/sanityCheckDeployment.py --mode UnDeploy --service all'
// Undeploy once OK
sh 'python3 ./ci-scripts/sanityCheckDeployment.py --mode UnDeploy --docker_compose docker-compose-gnbsim.yaml --service gnbsim-vpp'
sh 'python3 ./ci-scripts/sanityCheckDeployment.py --mode UnDeploy --service all'
}
}
}
}
......@@ -256,6 +258,40 @@ pipeline {
}
}
}
stage('Testing whole 5g Core Network Functions') {
parallel {
stage ('Testing the tutorials') {
steps {
script {
gitlabCommitStatus(name: "Test tutorials") {
localStatus = build job: 'OAI-CN5G-Tutorials-Check',
parameters: [
string(name: 'UPF_VPP_TAG', value: String.valueOf(upf_tag)),
string(name: 'UPF_VPP_BRANCH', value: String.valueOf(upf_branch))
], propagate: false
localResult = localStatus.getResult()
if (localStatus.resultIsBetterOrEqualTo('SUCCESS')) {
echo "Tutorials Test Job is OK"
} else {
echo "Tutorials Test Job is KO"
sh "ci-scripts/fail.sh"
}
}
}
}
post {
always {
script {
copyArtifacts(projectName: 'OAI-CN5G-Tutorials-Check',
filter: '*_results_oai_cn5g*.html',
selector: lastCompleted())
}
}
}
}
}
}
// For the moment it is Docker-Hub, but we might have a new one internally.
stage ('Pushing Image to Official Registry') {
steps {
......@@ -314,14 +350,16 @@ pipeline {
}
try {
myShCmd('docker image prune --force', rem_u18_host_flag, rem_u18_host_user, rem_u18_host)
myShCmd('docker volume prune --force', rem_u18_host_flag, rem_u18_host_user, rem_u18_host)
} catch (Exception e) {
echo "We failed to prune all unneeded intermediate images"
echo "We failed to prune all un-needed intermediate images/volumes"
}
if (rem_rhel_host_flag) {
try {
myShCmd('sudo podman image prune --force', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host)
myShCmd('sudo podman volume prune --force', rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host)
} catch (Exception e) {
echo "We failed to prune all unneeded intermediate images"
echo "We failed to prune all un-needed intermediate images/volumes"
}
}
......
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