Fix pipeline

This commit is contained in:
Amin Ben Romdhane 2025-02-20 01:19:35 +01:00
parent 41fc23af88
commit 28c0a97d15
4 changed files with 31 additions and 24 deletions

View file

@ -8,12 +8,17 @@ source ./gitlab-ci/shared.sh
exec_cmd apt update
exec_cmd pip3 install xlwt
# Make sure that all plugins are removed
[ ! -d "${BBFDM_PLUGIN_DIR}" ] && mkdir -p "${BBFDM_PLUGIN_DIR}"
rm -f ${BBFDM_PLUGIN_DIR}/*
# Create directories for micro-service configuration and shared files
[ ! -d "${BBFDM_MS_CONF}" ] && mkdir -p "${BBFDM_MS_CONF}"
[ ! -d "${BBFDM_MS_DIR}" ] && mkdir -p "${BBFDM_MS_DIR}"
# Make sure that all generated files are removed
rm -rf ${BBFDM_MS_DIR}/*
rm -f ${BBFDM_MS_CONF}/*
rm -f ${BBFDM_DMMAP_DIR}/*
rm -f ${BBFDM_LOG_FILE}
# compile and install libbbf
# compile and install Core Data Model as a micro-service
install_libbbf ${1}
#compile and install libbbf_test dynamic extension library
@ -23,14 +28,6 @@ install_libbbf_test ${1}
if [ -z "${1}" ]; then
echo "Skip installation of micro-services ...."
else
# Create directories for micro-service configuration and shared files
mkdir -p /etc/bbfdm/services
mkdir -p /usr/share/bbfdm/micro_services
#install Core Data Model as a micro-service
echo "Installing Core (libbbfdm) Data Model as a micro-service"
exec_cmd cp /usr/lib/libcore.so /usr/share/bbfdm/micro_services/core.so
#install SYSMNGR Data Model as a micro-service
echo "Installing System Manager (SYSMNGR) Data Model as a micro-service"
install_sysmngr_as_micro_service

View file

@ -10,6 +10,10 @@ command=/bin/bash -c "/usr/bin/valgrind --xml=yes --xml-file=/tmp/memory-netmngr
priority=7
command=/bin/bash -c "/usr/bin/valgrind --xml=yes --xml-file=/tmp/memory-wifidmd-report.xml --leak-check=full --show-reachable=yes --show-leak-kinds=all --errors-for-leak-kinds=all --error-exitcode=1 --track-origins=yes --leak-resolution=high --show-error-list=yes --child-silent-after-fork=yes /usr/sbin/dm-service -m wifidmd"
[program:core]
priority=8
command=/bin/bash -c "/usr/bin/valgrind --xml=yes --xml-file=/tmp/memory-core-report.xml --leak-check=full --show-reachable=yes --show-leak-kinds=all --errors-for-leak-kinds=all --error-exitcode=1 --track-origins=yes --leak-resolution=high --show-error-list=yes --child-silent-after-fork=yes /usr/sbin/dm-service -m core"
[program:ethmngr]
priority=10
command=/bin/bash -c "/usr/bin/valgrind --xml=yes --xml-file=/tmp/memory-ethmngr-report.xml --leak-check=full --show-reachable=yes --show-leak-kinds=all --errors-for-leak-kinds=all --error-exitcode=1 --track-origins=yes --leak-resolution=high --show-error-list=yes --child-silent-after-fork=yes /usr/sbin/ethmngr"

View file

@ -1,7 +1,8 @@
#!/bin/bash
BBFDM_PLUGIN_DIR="/usr/share/bbfdm/plugins"
BBFDM_MS_DIR="/usr/share/bbfdm/micro_services"
BBFDM_MS_CONF="/etc/bbfdm/services"
BBFDM_DMMAP_DIR="etc/bbfdm/dmmap/"
BBFDM_LOG_FILE="/tmp/bbfdm.log"
if [ -z "${CI_PROJECT_PATH}" ]; then
@ -43,9 +44,15 @@ function exec_cmd_verbose()
fi
}
function install_plugin()
function install_ms()
{
exec_cmd cp -f "${1}" ${BBFDM_PLUGIN_DIR}/
exec_cmd cp -f "${1}" ${BBFDM_MS_DIR}/${2}.so
}
function install_ms_plugin()
{
exec_cmd mkdir -p ${BBFDM_MS_DIR}/${2}
exec_cmd cp -f "${1}" ${BBFDM_MS_DIR}/${2}/
}
function install_libbbf()
@ -73,6 +80,7 @@ function install_libbbf()
echo "371d530c95a17d1ca223a29b7a6cdc97e1135c1e0959b51106cca91a0b148b5e42742d372a359760742803f2a44bd88fca67ccdcfaeed26d02ce3b6049cb1e04" > /etc/bbfdm/.secure_hash
cd ..
exec_cmd cp utilities/bbf_configd /usr/sbin/
install_ms /usr/lib/libcore.so core
}
function install_libbbf_test()
@ -83,7 +91,7 @@ function install_libbbf_test()
exec_cmd_verbose make -C test/bbf_test/
echo "installing libbbf_test"
install_plugin ./test/bbf_test/libbbf_test.so
install_ms_plugin ./test/bbf_test/libbbf_test.so core
}
function install_wifidmd_as_micro_service()
@ -93,7 +101,7 @@ function install_wifidmd_as_micro_service()
exec_cmd git clone -b bbfdm_core https://dev.iopsys.eu/bbf/wifidmd.git /opt/dev/wifidmd
exec_cmd make -C /opt/dev/wifidmd/src/ clean && make -C /opt/dev/wifidmd/src/ CFLAGS="-D'BBF_VENDOR_PREFIX=\"X_IOPSYS_EU_\"'" WIFIDMD_WIFI_DATAELEMENTS='y'
exec_cmd cp -f /opt/dev/wifidmd/src/libwifi.so /usr/share/bbfdm/micro_services/wifidmd.so
install_ms /opt/dev/wifidmd/src/libwifi.so wifidmd
}
function install_libeasy()
@ -147,26 +155,25 @@ function install_netmngr_as_micro_service()
exec_cmd make -C /opt/dev/netmngr/src/ clean
exec_cmd make -C /opt/dev/netmngr/src/ NETMNGR_GRE_OBJ=y NETMNGR_IP_OBJ=y NETMNGR_ROUTING_OBJ=y NETMNGR_PPP_OBJ=y NETMNGR_ROUTER_ADVERTISEMENT_OBJ=y NETMNGR_IPV6RD_OBJ=y
exec_cmd cp -f /opt/dev/netmngr/src/libnetmngr.so /usr/share/bbfdm/micro_services/netmngr.so
exec_cmd mkdir -p /usr/share/bbfdm/micro_services/netmngr
install_ms /opt/dev/netmngr/src/libnetmngr.so netmngr
exec_cmd git clone https://dev.iopsys.eu/bbf/tr143d.git /opt/dev/tr143d
exec_cmd make -C /opt/dev/tr143d/src/ clean && make -C /opt/dev/tr143d/src/
exec_cmd cp -f /opt/dev/tr143d/src/libtr143d.so /usr/share/bbfdm/micro_services/netmngr
exec_cmd cp -f utilities/files/usr/share/bbfdm/scripts/bbf_api /usr/share/bbfdm/scripts/
exec_cmd cp -rf /opt/dev/tr143d/scripts/* /usr/share/bbfdm/scripts/
install_ms_plugin /opt/dev/tr143d/src/libtr143d.so netmngr
exec_cmd git clone https://dev.iopsys.eu/bbf/tr471d.git /opt/dev/tr471d
exec_cmd make -C /opt/dev/tr471d/src/ clean && make -C /opt/dev/tr471d/src/
exec_cmd cp -f /opt/dev/tr471d/src/libtr471d.so /usr/share/bbfdm/micro_services/netmngr
install_ms_plugin /opt/dev/tr471d/src/libtr471d.so netmngr
exec_cmd git clone https://dev.iopsys.eu/bbf/twamp-light.git /opt/dev/twamp
exec_cmd make -C /opt/dev/twamp clean && make -C /opt/dev/twamp
exec_cmd cp -f /opt/dev/twamp/libtwamp.so /usr/share/bbfdm/micro_services/netmngr
install_ms_plugin /opt/dev/twamp/libtwamp.so netmngr
exec_cmd git clone https://dev.iopsys.eu/bbf/udpecho.git /opt/dev/udpecho
exec_cmd make -C /opt/dev/udpecho/src/ clean && make -C /opt/dev/udpecho/src/
exec_cmd cp -f /opt/dev/udpecho/src/libudpechoserver.so /usr/share/bbfdm/micro_services/netmngr
install_ms_plugin /opt/dev/udpecho/src/libudpechoserver.so netmngr
}
function install_sysmngr_as_micro_service()

View file

@ -19,7 +19,6 @@ INSTALL(DIRECTORY DESTINATION etc/bbfdm)
INSTALL(DIRECTORY DESTINATION etc/bbfdm/dmmap)
INSTALL(DIRECTORY DESTINATION usr/share/bbfdm)
INSTALL(DIRECTORY DESTINATION usr/share/bbfdm/scripts)
INSTALL(DIRECTORY DESTINATION usr/share/bbfdm/plugins)
INSTALL(DIRECTORY DESTINATION usr/share/bbfdm/micro_services)
INSTALL(DIRECTORY DESTINATION usr/libexec/rpcd)