Skip to content

Commit 7d6920c

Browse files
committed
migrate CI test steps to containers
Today we use benni09 static agent to run test/gtest/valgrind steps which is unscaleable since it can only run one pipeline at a time, causing delays in builds that can be stuck waiting for hours The idea is to move these steps to containers, allowing running them in parallel as well as running multiple pipelines at the same time (depending on the capacity of the k8s cluster) Issue: HPCINFRA-3250 Signed-off-by: NirWolfer <[email protected]>
1 parent 191dfbd commit 7d6920c

File tree

5 files changed

+297
-213
lines changed

5 files changed

+297
-213
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
ARG ARCH=x86_64
2+
FROM harbor.mellanox.com/hpcx/x86_64/ubuntu22.04/base AS build
3+
FROM build AS tests
4+
RUN apt-get update && \
5+
apt-get install -y \
6+
net-tools unzip iproute2 wget \
7+
&& apt-get clean && rm -rf /var/lib/apt/lists/*
8+
FROM tests AS vg
9+
RUN apt-get update && \
10+
apt-get install -y \
11+
valgrind \
12+
&& apt-get clean && rm -rf /var/lib/apt/lists/*
13+
FROM tests AS test
14+
RUN apt-get update && \
15+
apt-get install -y \
16+
openssh-server psmisc \
17+
&& apt-get clean && rm -rf /var/lib/apt/lists/*
18+
# setup ssh server and passwordless login for root for tests flows (verifyer.pl)
19+
RUN mkdir -p /var/run/sshd ~/.ssh && \
20+
rm -rf ~/.ssh/id_rsa* && ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa && \
21+
cat ~/.ssh/id_rsa.pub > ~/.ssh/authorized_keys && \
22+
sed -i 's|#PermitRootLogin.*|PermitRootLogin without-password|g' /etc/ssh/sshd_config && \
23+
sed -i 's|#PasswordAuthentication.*|PasswordAuthentication no|g' /etc/ssh/sshd_config && \
24+
echo "Host *" >> ~/.ssh/config && \
25+
echo " StrictHostKeyChecking no" >> ~/.ssh/config && \
26+
echo " UserKnownHostsFile /dev/null" >> ~/.ssh/config && \
27+
echo " LogLevel ERROR" >> ~/.ssh/config
28+
FROM tests AS gtest
29+
FROM build AS style
30+
RUN apt-get update \
31+
&& apt-get install -y clang-15 clang-format-15 \
32+
&& update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-15 100 \
33+
&& update-alternatives --install /usr/bin/clang clang /usr/bin/clang-15 100 \
34+
--slave /usr/bin/clang++ clang++ /usr/bin/clang++-15 \
35+
&& apt-get clean && rm -rf /var/lib/apt/lists/*

0 commit comments

Comments
 (0)