Skip to content

ci: add ubuntu 24.04 #156

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: v23.01.5.nvda
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ci/Dockerfile.openeuler.22.03
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ RUN dnf install -y \
RUN set -eux; \
echo -e "[mlnx_ofed]\n\
name=Mellanox Technologies \$basearch mlnx_ofed\n\
baseurl=http://webrepo.mtr.labs.mlnx/mswg/release/MLNX_OFED/MLNX_OFED_LINUX-${MOFED_VER}/MLNX_OFED_LINUX-${MOFED_VER}-openeuler22.03-\$basearch/RPMS/\n\
baseurl=http://webrepo.mtr.labs.mlnx/mswg/release/MLNX_OFED/MLNX_OFED_LINUX-${MOFED_VER}/MLNX_OFED_LINUX-${MOFED_VER}-openeuler22.03sp4-\$basearch/RPMS/\n\
enabled=1\n\
gpgcheck=0" > /etc/yum.repos.d/mellanox_mlnx_ofed.repo; \
dnf install -y mlnx-ofed-basic-user-only
Expand Down
4 changes: 3 additions & 1 deletion .ci/Dockerfile.ubuntu20.04
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ RUN apt-get update && \
patchelf \
python3-pyelftools \
python3-requests \
python3-pip \
linux-headers-generic \
pkg-config nasm
pkg-config nasm \
lsb-release

RUN echo "deb [trusted=yes] https://urm.nvidia.com/artifactory/sw-nbu-swx-ci-debian-local focal liburing1" > /etc/apt/sources.list.d/liburing.list && \
apt update && apt install -y liburing-dev
Expand Down
4 changes: 3 additions & 1 deletion .ci/Dockerfile.ubuntu22.04
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ RUN apt-get update && \
patchelf \
python3-pyelftools \
python3-requests \
python3-pip \
liburing-dev \
linux-headers-generic \
pkg-config nasm
pkg-config nasm \
lsb-release

RUN wget -qO - https://www.mellanox.com/downloads/ofed/RPM-GPG-KEY-Mellanox | \
sudo apt-key add - && \
Expand Down
57 changes: 57 additions & 0 deletions .ci/Dockerfile.ubuntu24.04
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
FROM ubuntu:24.04
ARG _UID=6213
ARG _GID=11429
ARG _LOGIN=swx-jenkins
ARG _HOME=/var/home/$_LOGIN
ARG DEBIAN_FRONTEND=noninteractive
ARG MOFED_VER
ENV TZ=Etc/UTC
USER root

RUN apt-get update && \
apt-get install -y \
git \
vim \
wget \
curl \
python3 \
dpkg-dev \
sudo \
debhelper \
debsigs \
autotools-dev \
dh-python \
libiscsi-dev \
meson \
uuid-dev \
libssl-dev \
libaio-dev \
libncurses-dev \
libcunit1-dev \
patchelf \
python3-pyelftools \
python3-requests \
python3-pip \
liburing-dev \
linux-headers-generic \
pkg-config nasm \
libnuma-dev \
libfuse3-dev \
lsb-release

RUN wget -qO - https://www.mellanox.com/downloads/ofed/RPM-GPG-KEY-Mellanox | \
sudo apt-key add - && \
echo "deb [trusted=yes] http://nbu-nfs.gtm.nvidia.com/auto/mswg/release/MLNX_OFED/MLNX_OFED_LINUX-${MOFED_VER}/MLNX_OFED_LINUX-${MOFED_VER}-ubuntu24.04-$(dpkg-architecture -qDEB_HOST_GNU_CPU)/DEBS/ ./" > /etc/apt/sources.list.d/ofed.list && \
apt update && KVERSION=$(ls /lib/modules) apt install -y mlnx-ofed-basic-user-only && \
apt-get download libxlio-dev && dpkg --force-all -i libxlio-dev*

RUN echo "${_LOGIN} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
RUN mkdir -p $_HOME
RUN groupadd -f -g "$_GID" "$_LOGIN"
RUN useradd -u "$_UID" -g "$_GID" -s /bin/bash -m -d ${_HOME} "$_LOGIN"
RUN chown $_LOGIN $_HOME

SHELL ["/bin/bash"]

USER "${_LOGIN}"
ENTRYPOINT [ "/bin/bash", "--login", "--rcfile", "/etc/bashrc", "-c" ]
8 changes: 7 additions & 1 deletion .ci/build_deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ if [ -z "$VER" ] ; then
export VER=$(echo $branch | grep -o '[0-9]\+\(\.[0-9]\+\)*')
fi

if test -n "$ghprbPullId" ; then
REV="pr${ghprbPullId}"
else
REV="${BUILD_NUMBER:-1}"
fi

function pack_dist()
{
git submodule init
Expand All @@ -35,7 +41,7 @@ function pack_dist()
function generate_changelog()
{
today=$(date +"%a, %d %b %Y %T %z")
sed -e "s/@PACKAGE_VERSION@/$VER/" -e "s/@PACKAGE_REVISION@/${BUILD_NUMBER:-1}/" \
sed -e "s/@PACKAGE_VERSION@/$VER/" -e "s/@PACKAGE_REVISION@/${REV}/" \
-e 's/@PACKAGE_BUGREPORT@/[email protected]/' -e "s/@BUILD_DATE_CHANGELOG@/$today/" \
debian/changelog.in > debian/changelog
}
Expand Down
9 changes: 5 additions & 4 deletions .ci/job_matrix.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
job: spdk

registry_host: harbor.mellanox.com
registry_host: nbu-harbor.gtm.nvidia.com
registry_path: /swx-storage/spdk

credentials:
Expand All @@ -15,7 +15,7 @@ kubernetes:
privileged: true

env:
MOFED_VER: 23.07-0.5.0.0
MOFED_VER: 25.04-0.6.0.0
REGISTRY_AUTH_FILE: '/mnt/secret_podman/config_podman.json'
GIT_SSH_COMMAND: 'ssh -o StrictHostKeyChecking=no'

Expand All @@ -27,7 +27,8 @@ secret_volumes:
runs_on_dockers:
- {file: '.ci/Dockerfile.ubuntu20.04', name: 'ubuntu20_04', arch: 'aarch64', build_args: '--build-arg MOFED_VER=$MOFED_VER', tag: '$MOFED_VER'}
- {file: '.ci/Dockerfile.ubuntu22.04', name: 'ubuntu22_04', arch: 'aarch64', build_args: '--build-arg MOFED_VER=$MOFED_VER', tag: '$MOFED_VER'}
- {file: '.ci/Dockerfile.centos7.9.2009', name: 'centos7_9', arch: 'aarch64', build_args: '--build-arg MOFED_VER=$MOFED_VER', tag: '$MOFED_VER'}
- {file: '.ci/Dockerfile.ubuntu24.04', name: 'ubuntu24_04', arch: 'aarch64', build_args: '--build-arg MOFED_VER=$MOFED_VER', tag: '$MOFED_VER'}
# - {file: '.ci/Dockerfile.centos7.9.2009', name: 'centos7_9', arch: 'aarch64', build_args: '--build-arg MOFED_VER=$MOFED_VER', tag: '$MOFED_VER'}
- {file: '.ci/Dockerfile.centos8', name: 'centos8_stream', arch: 'aarch64', build_args: '--build-arg MOFED_VER=$MOFED_VER', tag: '$MOFED_VER'}
- {file: '.ci/Dockerfile.openeuler.20.03', name: 'openeuler20_03', arch: 'aarch64', build_args: '--build-arg MOFED_VER=$MOFED_VER', tag: '$MOFED_VER'}
- {file: '.ci/Dockerfile.openeuler.22.03', name: 'openeuler22_03', arch: 'aarch64', build_args: '--build-arg MOFED_VER=$MOFED_VER', tag: '$MOFED_VER'}
Expand Down Expand Up @@ -58,7 +59,7 @@ steps:
containerSelector:
- "{name: 'ubuntu20_04', variant:1}"
- "{name: 'ubuntu22_04', variant:1}"
- "{name: 'centos7_9', variant:1}"
- "{name: 'ubuntu24_04', variant:1}"
- "{name: 'centos8_stream', variant:1}"
- "{name: 'openeuler20_03', variant:1}"
- "{name: 'openeuler22_03', variant:1}"
Expand Down
19 changes: 15 additions & 4 deletions .ci/upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ get_releasever() {
echo $releasever
}

get_os_name() {
. /etc/os-release
echo "${ID}_${VERSION_ID}"
}


upload_deb_urm() {
# Import gpg key
gpg --import ${GPG_KEY_PATH}
Expand All @@ -35,10 +41,15 @@ upload_deb_urm() {
for deb_pkg in ${deb_pkgs[@]}; do
test -e $deb_pkg
echo "INFO: Signing package ${deb_pkg##*/}"
sign_deb=$(dpkg-sig -k ${gpg_key_name} -c ${deb_pkg}|tail -n1)
if [ $sign_deb == "NOSIG" ]; then
dpkg-sig -k ${gpg_key_name} -s builder ${deb_pkg}
fi
# Debian 12 doesn't have dpkg-sig, so use debsigs
case "$(get_os_name)" in
debian_12|ubuntu_24.04)
debsigs --sign=origin -k ${gpg_key_name} ${deb_pkg}
;;
*)
dpkg-sig -k ${gpg_key_name} -s builder ${deb_pkg}
;;
esac
MD5=$(md5sum $deb_pkg | awk '{print $1}')
SHA1=$(shasum -a 1 $deb_pkg | awk '{ print $1 }')
SHA256=$(shasum -a 256 $deb_pkg | awk '{ print $1 }')
Expand Down
8 changes: 7 additions & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ override_dh_auto_install:
install -p -m 644 isa-l-crypto/.libs/libisal_crypto.a debian/tmp$(pkg_prefix)/lib
#make -C dpdk install prefix=../debian/tmp$(pkg_prefix)
#chrpath -r $(pkg_prefix)/lib debian/tmp$(pkg_prefix)/lib/lib*so.*
patchelf --set-rpath $(pkg_prefix)/lib --force-rpath debian/tmp$(pkg_prefix)/lib/lib*so.*
rm -rf debian/tmp$(pkg_prefix)/share/dpdk/examples
dh_auto_install -- prefix=$(pkg_prefix)
(cd scripts ; python3 setup.py install --install-layout=deb --root=../debian/tmp )
Expand All @@ -91,6 +90,13 @@ override_dh_installdeb:
dh_installdeb
rm debian/*/DEBIAN/conffiles

# Run patchelf after strip to avoid corruption with patchelf > 0.14 (RM 4406077)
override_dh_strip:
dh_strip
for so in debian/*/$(pkg_prefix)/lib/lib*so.*; do \
patchelf --set-rpath $(pkg_prefix)/lib --force-rpath $$so || true; \
done

override_dh_shlibdeps:
dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info -l$(shell pwd)/debian/tmp$(pkg_prefix)/lib

Expand Down