Skip to content
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

[DOCA] Run tests in containers on ubuntu22.04 #155

Closed
wants to merge 5 commits into from
Closed
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/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// load pipeline functions
// Requires pipeline-github-lib plugin to load library from github
@Library('github.com/Mellanox/ci-demo@stable')
@Library('github.com/Mellanox/ci-demo@stable_media')
def matrix = new com.mellanox.cicd.Matrix()

matrix.main()
26 changes: 0 additions & 26 deletions .ci/dockerfiles/Dockerfile.rhel8.6

This file was deleted.

54 changes: 54 additions & 0 deletions .ci/dockerfiles/Dockerfile.ubuntu22.04
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
ARG ARCH=x86_64
FROM harbor.mellanox.com/hpcx/$ARCH/ubuntu22.04/builder:mofed-5.7-0.1.9.0 AS build
# ARG _UID=6213
# ARG _GID=101
# ARG _LOGIN=swx-jenkins
# ARG _HOME=/var/home/$_LOGIN

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

# ENTRYPOINT [ "/bin/bash", "--login", "--rcfile", "/etc/bashrc", "-c" ]

FROM build AS tests
RUN apt-get update && \
apt-get install -y \
net-tools unzip iproute2 wget \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

FROM tests AS vg
RUN apt-get update && \
apt-get install -y \
valgrind \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

FROM tests AS test
RUN apt-get update && \
apt-get install -y \
openssh-server psmisc \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# setup ssh server and passwordless login for root for tests flows (verifyer.pl)
RUN mkdir -p /var/run/sshd ~/.ssh && \
rm -rf ~/.ssh/id_rsa* && ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa && \
cat ~/.ssh/id_rsa.pub > ~/.ssh/authorized_keys && \
sed -i 's|#PermitRootLogin.*|PermitRootLogin without-password|g' /etc/ssh/sshd_config && \
sed -i 's|#PasswordAuthentication.*|PasswordAuthentication no|g' /etc/ssh/sshd_config && \
echo "Host *" >> ~/.ssh/config && \
echo " StrictHostKeyChecking no" >> ~/.ssh/config && \
echo " UserKnownHostsFile /dev/null" >> ~/.ssh/config && \
echo " LogLevel ERROR" >> ~/.ssh/config

FROM tests AS gtest

FROM build AS static
# for tidy tests
RUN pip3 install compiledb --no-cache-dir
RUN apt-get update && \
apt-get install -y \
cppcheck clang-tools clang-tidy \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
Loading