Skip to content

Commit a0619a9

Browse files
NirWolfergalnoam
authored andcommitted
[CI] issue: 4207451 Add libjson-c dependency to build containers
There is a new dependency required in all build containers by the dev team - libjson-c Add apt/yum install for each build container Add dockerfile for build containers without one. Signed-off-by: NirWolfer <[email protected]>
1 parent 7fd9fe1 commit a0619a9

File tree

7 files changed

+65
-53
lines changed

7 files changed

+65
-53
lines changed

.ci/dockerfiles/Dockerfile.ctyunos23.01

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ARG _GID=101
77
ARG _LOGIN=swx-jenkins
88
ARG _HOME=/var/home/$_LOGIN
99

10-
RUN dnf --releasever=23.01 install -y autoconf automake make libtool git gcc-c++ \
10+
RUN dnf --releasever=23.01 install -y autoconf automake make libtool json-c-devel git gcc-c++ \
1111
util-linux sudo rpm-build \
1212
&& dnf clean all \
1313
&& rm -rf /var/cache/dnf

.ci/dockerfiles/Dockerfile.rhel8.6

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,20 @@
1-
FROM harbor.mellanox.com/hpcx/x86_64/rhel8.6/core:latest
1+
ARG ARCH=x86_64
2+
ARG HARBOR_URL=nbu-harbor.gtm.nvidia.com
3+
FROM $HARBOR_URL/hpcx/$ARCH/rhel8.6/core:latest as core
24
ARG _UID=6213
35
ARG _GID=101
46
ARG _LOGIN=swx-jenkins
57
ARG _HOME=/var/home/$_LOGIN
8+
RUN echo "${_LOGIN} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
9+
echo "root ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
10+
mkdir -p ${_HOME} && \
11+
groupadd -f -g "$_GID" "$_LOGIN" && \
12+
useradd -u "$_UID" -g "$_GID" -s /bin/bash -m -d ${_HOME} "${_LOGIN}" && \
13+
chown -R ${_LOGIN} ${_HOME} && \
14+
mkdir /build && chown -R ${_LOGIN} /build
15+
16+
FROM core as static
17+
ARG _LOGIN=swx-jenkins
618

719
RUN yum install -y yum-utils \
820
&& yum-config-manager --add-repo https://archives.fedoraproject.org/pub/archive/epel/7/x86_64/ \
@@ -15,13 +27,31 @@ RUN yum install -y yum-utils \
1527
RUN pip3 install -U pip --no-cache-dir \
1628
&& pip3 install compiledb --no-cache-dir
1729

18-
RUN echo "${_LOGIN} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
19-
echo "root ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
20-
mkdir -p ${_HOME} && \
21-
groupadd -f -g "$_GID" "$_LOGIN" && \
22-
useradd -u "$_UID" -g "$_GID" -s /bin/bash -m -d ${_HOME} "${_LOGIN}" && \
23-
chown -R ${_LOGIN} ${_HOME} && \
24-
mkdir /build && chown -R ${_LOGIN} /build
25-
2630
USER "$_LOGIN"
2731
ENTRYPOINT [ "/bin/bash", "--login", "--rcfile", "/etc/bashrc", "-c" ]
32+
33+
34+
FROM core as release
35+
ARG _UID=6213
36+
ARG _GID=101
37+
ARG _LOGIN=swx-jenkins
38+
ARG _HOME=/var/home/$_LOGIN
39+
ARG WEBREPO_URL=webrepo.gtm.nvidia.com
40+
RUN sed -i "s#http://webrepo#http://${WEBREPO_URL}#" /etc/yum.repos.d/* && \
41+
sed -i 's/mirrorlist/#mirrorlist/;s!#baseurl=http://mirror.centos.org!baseurl=http://vault.centos.org!' /etc/yum.repos.d/* && \
42+
echo "[mlnx-opt]" > /etc/yum.repos.d/mlnx-opt.repo && \
43+
echo "name=RHEL 8.6 mirror" >> /etc/yum.repos.d/mlnx-opt.repo && \
44+
echo "baseurl=http://${WEBREPO_URL}/RH/optional/8.6/x86_64/" >> /etc/yum.repos.d/mlnx-opt.repo && \
45+
echo "enabled=1" >> /etc/yum.repos.d/mlnx-opt.repo && \
46+
echo "gpgcheck=0" >> /etc/yum.repos.d/mlnx-opt.repo && \
47+
yum makecache
48+
49+
RUN yum install --allowerasing -y \
50+
git autoconf automake libtool gcc \
51+
sudo gcc-c++ libibverbs-devel json-c-devel rdma-core \
52+
librdmacm unzip patch wget make \
53+
libnl3-devel rpm-build
54+
55+
56+
FROM harbor.mellanox.com/hpcx/$ARCH/rhel8.6/base as build
57+
RUN yum install -y json-c-devel

.ci/dockerfiles/Dockerfile.rhel8.6.release

Lines changed: 0 additions & 29 deletions
This file was deleted.

.ci/dockerfiles/Dockerfile.ubuntu22.04

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
FROM harbor.mellanox.com/hpcx/x86_64/ubuntu22.04/base AS style
1+
ARG ARCH=x86_64
2+
FROM harbor.mellanox.com/hpcx/$ARCH/ubuntu22.04/base AS build
3+
RUN apt-get update \
4+
&& apt-get install -y libjson-c-dev \
5+
&& apt-get clean && rm -rf /var/lib/apt/lists/*
6+
7+
FROM build as style
28
RUN apt-get update \
39
&& apt-get install -y clang-15 clang-format-15 \
410
&& update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-15 100 \
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
ARG ARCH=x86_64
2+
FROM harbor.mellanox.com/hpcx/$ARCH/ubuntu22.04/base AS build
3+
RUN apt-get update \
4+
&& apt-get install -y libjson-c-dev \
5+
&& apt-get clean && rm -rf /var/lib/apt/lists/*

.ci/matrix_job.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ volumes:
3636

3737
runs_on_dockers:
3838
# build
39-
- {name: 'ub22.04-x86_64', url: 'harbor.mellanox.com/hpcx/x86_64/ubuntu22.04/base', category: 'base', arch: 'x86_64'}
40-
- {name: 'ub22.04-aarch64', url: 'harbor.mellanox.com/hpcx/aarch64/ubuntu22.04/base', category: 'base', arch: 'aarch64'}
41-
- {name: 'rhel8.6-x86_64', url: 'harbor.mellanox.com/hpcx/x86_64/rhel8.6/base', category: 'base', arch: 'x86_64'}
42-
- {name: 'ub24.04-x86_64', url: 'harbor.mellanox.com/hpcx/x86_64/ubuntu24.04/base', category: 'base', arch: 'x86_64'}
43-
- {name: 'ub24.04-aarch64', url: 'harbor.mellanox.com/hpcx/aarch64/ubuntu24.04/base', category: 'base', arch: 'aarch64'}
39+
- {file: '.ci/dockerfiles/Dockerfile.ubuntu22.04', name: 'ub22.04-x86_64', uri: 'xlio/$arch/$name/build', tag: '20250227', category: 'base', arch: 'x86_64', build_args: '--build-arg ARCH=x86_64 --no-cache --target build'}
40+
- {file: '.ci/dockerfiles/Dockerfile.ubuntu22.04', name: 'ub22.04-aarch64', uri: 'xlio/$arch/$name/build', tag: '20250227', category: 'base', arch: 'aarch64', build_args: '--build-arg ARCH=aarch64 --no-cache --target build'}
41+
- {file: '.ci/dockerfiles/Dockerfile.rhel8.6', name: 'rhel8.6-x86_64', uri: 'xlio/$arch/$name/build', tag: '20250227', category: 'base', arch: 'x86_64', build_args: '--no-cache --target build'}
42+
- {file: '.ci/dockerfiles/Dockerfile.ubuntu24.04', name: 'ub24.04-x86_64', uri: 'xlio/$arch/$name/build', tag: '20250227', category: 'base', arch: 'x86_64', build_args: '--build-arg ARCH=x86_64 --no-cache --target build'}
43+
- {file: '.ci/dockerfiles/Dockerfile.ubuntu24.04', name: 'ub24.04-aarch64', uri: 'xlio/$arch/$name/build', tag: '20250227', category: 'base', arch: 'aarch64', build_args: '--build-arg ARCH=aarch64 --no-cache --target build'}
4444
- {
4545
file: '.ci/dockerfiles/Dockerfile.ol9.4',
4646
arch: 'aarch64',
@@ -74,7 +74,7 @@ runs_on_dockers:
7474
arch: 'x86_64',
7575
name: 'style',
7676
uri: 'xlio/$arch/ubuntu22.04/$name',
77-
tag: '20240812',
77+
tag: '20250304',
7878
build_args: '--no-cache --target style',
7979
category: 'tool'
8080
}
@@ -86,16 +86,16 @@ runs_on_dockers:
8686
arch: 'x86_64',
8787
name: 'xlio_static.cppcheck',
8888
uri: '$arch/$name',
89-
tag: '20240812',
90-
build_args: '--no-cache',
89+
tag: '20250304',
90+
build_args: '--no-cache --target static',
9191
category: 'tool'
9292
}
9393
- {file: '.ci/dockerfiles/Dockerfile.rhel8.6',
9494
arch: 'x86_64',
9595
name: 'xlio_static.csbuild',
9696
uri: '$arch/$name',
97-
tag: '20240812',
98-
build_args: '--no-cache',
97+
tag: '20250304',
98+
build_args: '--no-cache --target static',
9999
category: 'tool'
100100
}
101101

.ci/pipeline/release_matrix_job.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ volumes:
2424

2525
runs_on_dockers:
2626
- {
27-
file: '.ci/dockerfiles/Dockerfile.rhel8.6.release',
27+
file: '.ci/dockerfiles/Dockerfile.rhel8.6',
2828
name: 'rhel8.6',
2929
uri: '$arch/$name/release',
30-
build_args: '--no-cache',
30+
build_args: '--no-cache --target release',
3131
arch: 'x86_64',
32-
tag: '20250128'
32+
tag: '20250304'
3333
}
3434

3535

0 commit comments

Comments
 (0)