Skip to content

Commit

Permalink
update driver ci
Browse files Browse the repository at this point in the history
  • Loading branch information
kulukami committed Mar 19, 2024
1 parent 6003e21 commit 7c66f4c
Show file tree
Hide file tree
Showing 59 changed files with 769 additions and 259 deletions.
286 changes: 186 additions & 100 deletions .github/workflows/Elkeid_driver_build.yml

Large diffs are not rendered by default.

302 changes: 198 additions & 104 deletions .github/workflows/Elkeid_driver_release.yml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions driver/build_script/gen_ci_from_dockerfiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ def gen_job(vminfo):
}),
OrderedDict({
"name": "Set up Docker Buildx "+vmname,
"uses": "docker/setup-buildx-action@v2",
"uses": "docker/setup-buildx-action@v3",
"with": {
"config": "/etc/buildkitd.toml",
}
}) if aarch.endswith("aarch64") else OrderedDict({
"name": "Set up Docker Buildx "+vmname,
"uses": "docker/setup-buildx-action@v2"
"uses": "docker/setup-buildx-action@v3"
}),

OrderedDict({
Expand Down
6 changes: 4 additions & 2 deletions driver/dockerfiles.aarch64/Dockerfile.rhel8
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
FROM arm64v8/oraclelinux:8 AS rhel8


RUN dnf install -y wget perl gcc make tree elfutils-libelf-devel yumdownloader gnutls-utils pciutils-libs;
RUN dnf install -y wget perl gcc make tree elfutils-libelf-devel openssl-devel openssl;
RUN dnf groupinstall -y "Development Tools";

RUN dnf install -y centos-release-scl
RUN dnf install -y devtoolset-8

RUN rm -rf /root/headers || true
RUN mkdir /root/headers

ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/aarch64/batch_compile_el7.sh
RUN bash ./build_script/aarch64/batch_compile_el8.sh
5 changes: 5 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.aliyun_linux2
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,9 @@ RUN rpm --force -i /root/headers/*.rpm || true
ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh
RUN dnf remove -y kernel-devel || true


FROM kulukami/aliyun_linux2:latest
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
5 changes: 5 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.aliyun_linux3
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,9 @@ RUN rpm --force -i /root/headers/*.rpm || true
ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh
RUN dnf remove -y kernel-devel || true


FROM kulukami/aliyun_linux3:latest
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
6 changes: 6 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.almalinux8
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,9 @@ ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh
RUN rm -rf /root/headers/*.rpm
RUN dnf remove -y kernel-devel || true


FROM almalinux:8
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
5 changes: 5 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.almalinux9
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,9 @@ ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh
RUN rm -rf /root/headers/*.rpm
RUN dnf remove -y kernel-devel || true


FROM almalinux/9-base
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
8 changes: 7 additions & 1 deletion driver/dockerfiles.x86_64/Dockerfile.amazonlinux1
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,10 @@ RUN rm -f /root/kernel-devel-*amzn1.x86_64.rpm

ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh
RUN bash ./build_script/x86_64/batch_compile.sh
RUN yum remove -y kernel-devel || true


FROM amazonlinux:1
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
8 changes: 7 additions & 1 deletion driver/dockerfiles.x86_64/Dockerfile.amazonlinux2
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,10 @@ RUN rm -f /root/kernel-devel-*amzn2.x86_64.rpm

ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh
RUN bash ./build_script/x86_64/batch_compile.sh
RUN yum remove -y kernel-devel || true


FROM amazonlinux:2
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
8 changes: 7 additions & 1 deletion driver/dockerfiles.x86_64/Dockerfile.amazonlinux2_510
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,10 @@ RUN rm -f /root/kernel-devel-*amzn2.x86_64.rpm

ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh
RUN bash ./build_script/x86_64/batch_compile.sh
RUN yum remove -y kernel-devel || true


FROM amazonlinux:1
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
8 changes: 7 additions & 1 deletion driver/dockerfiles.x86_64/Dockerfile.amazonlinux2_54
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,10 @@ RUN rm -f /root/kernel-devel-*amzn2.x86_64.rpm

ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh
RUN bash ./build_script/x86_64/batch_compile.sh
RUN yum remove -y kernel-devel || true


FROM amazonlinux:2
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
6 changes: 6 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.anolis8
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,9 @@ ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh
RUN rm -rf /root/headers/*.rpm
RUN dnf remove -y kernel-devel || true


FROM almalinux:8
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
8 changes: 7 additions & 1 deletion driver/dockerfiles.x86_64/Dockerfile.debian10
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,10 @@ RUN apt clean all

ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh
RUN bash ./build_script/x86_64/batch_compile.sh
RUN apt-get remove -y linux-headers* || true


FROM debian:buster
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
8 changes: 7 additions & 1 deletion driver/dockerfiles.x86_64/Dockerfile.debian11
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,10 @@ RUN apt clean all

ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh
RUN bash ./build_script/x86_64/batch_compile.sh
RUN apt-get remove -y linux-headers* || true


FROM debian:bullseye
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
20 changes: 13 additions & 7 deletions driver/dockerfiles.x86_64/Dockerfile.debian8
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,21 @@ RUN apt install --yes --force-yes gcc build-essential libelf-dev;
RUN apt install --yes --force-yes linux-compiler-gcc* || true
RUN apt install --yes --force-yes linux-kbuild*;
RUN apt install --yes --force-yes \
linux-headers-4.9.0-0.bpo.12-all-amd64 \
linux-headers-4.9.0-0.bpo.11-all-amd64 \
linux-headers-4.9-amd64 \
linux-headers-3.16.0-6-all-amd64 \
linux-headers-3.16.0-11-amd64 \
linux-headers-amd64 || true
linux-headers-4.9.0-0.bpo.12-all-amd64 \
linux-headers-4.9.0-0.bpo.11-all-amd64 \
linux-headers-4.9-amd64 \
linux-headers-3.16.0-6-all-amd64 \
linux-headers-3.16.0-11-amd64 \
linux-headers-amd64 || true



ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh
RUN bash ./build_script/x86_64/batch_compile.sh
RUN apt-get remove -y linux-headers* || true


FROM debian:jessie
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
7 changes: 6 additions & 1 deletion driver/dockerfiles.x86_64/Dockerfile.debian9
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,9 @@ RUN apt clean all

ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh
RUN bash ./build_script/x86_64/batch_compile.sh
RUN apt-get remove -y linux-headers* || true

FROM debian:stretch
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
8 changes: 7 additions & 1 deletion driver/dockerfiles.x86_64/Dockerfile.ol8_uek
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,10 @@ RUN rpm --force -i /root/headers/*.rpm || true
ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile_ol8_uek.sh
RUN rm -rf /root/headers/*.rpm
RUN rm -rf /root/headers/*.rpm
RUN dnf remove -y kernel-uek-devel || true


FROM oraclelinux:8
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
6 changes: 6 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.rhel6
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,9 @@ ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh
RUN rm -rf /root/headers/*
RUN yum remove -y kernel-devel || true


FROM centos:centos6
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
12 changes: 9 additions & 3 deletions driver/dockerfiles.x86_64/Dockerfile.rhel6_elrepo
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ FROM centos:centos6 AS rhel6

RUN rm -f /etc/yum.repos.d/CentOS-Media.repo
RUN sed -e "s|^mirrorlist=|#mirrorlist=|g" \
-e "s|^#baseurl=http://mirror.centos.org/centos/\$releasever|baseurl=https://mirrors.aliyun.com/centos-vault/6.10|g" \
-i.bak \
/etc/yum.repos.d/CentOS-*.repo
-e "s|^#baseurl=http://mirror.centos.org/centos/\$releasever|baseurl=https://mirrors.aliyun.com/centos-vault/6.10|g" \
-i.bak \
/etc/yum.repos.d/CentOS-*.repo

RUN yum install -y wget perl gcc make tree elfutils-libelf-devel unzip yum-utils;
RUN yum groupinstall -y "Development Tools";
Expand All @@ -14,3 +14,9 @@ RUN yum groupinstall -y "Development Tools";
ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile_elrepo6.sh
RUN yum remove -y kernel-devel || true


FROM centos:centos6
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
6 changes: 6 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.rhel7
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,9 @@ RUN mkdir /root/headers
ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile_el7.sh
RUN yum remove -y kernel-devel || true


FROM cern/cc7-base:latest
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
6 changes: 6 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.rhel7_centosplus
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,9 @@ RUN mkdir /root/headers
ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile_el7_centosplus.sh
RUN yum remove -y kernel-devel || true


FROM cern/cc7-base:latest
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
6 changes: 6 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.rhel7_elrepo_lt
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,9 @@ ADD . /elkeid
WORKDIR /elkeid/driver

RUN bash ./build_script/x86_64/batch_compile_elrepo7_lt.sh
RUN yum remove -y kernel-devel || true


FROM cern/cc7-base:latest
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
5 changes: 5 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.rhel7_elrepo_lt_archive
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@ ADD . /elkeid
WORKDIR /elkeid/driver

RUN bash ./build_script/x86_64/batch_compile_elrepo7_lt_archive.sh
RUN yum remove -y kernel-devel || true

FROM cern/cc7-base:latest
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
6 changes: 6 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.rhel7_elrepo_ml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,9 @@ ADD . /elkeid
WORKDIR /elkeid/driver

RUN bash ./build_script/x86_64/batch_compile_elrepo7_ml.sh
RUN yum remove -y kernel-devel || true


FROM cern/cc7-base:latest
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
6 changes: 6 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.rhel7_elrepo_ml_archive
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,9 @@ ADD . /elkeid
WORKDIR /elkeid/driver

RUN bash ./build_script/x86_64/batch_compile_elrepo7_ml_archive.sh
RUN yum remove -y kernel-devel || true


FROM cern/cc7-base:latest
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
8 changes: 6 additions & 2 deletions driver/dockerfiles.x86_64/Dockerfile.rhel8
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,18 @@ RUN rm -rf /root/headers || true
RUN mkdir /root/headers

RUN for eachversion in `dnf --showduplicates list kernel-devel | grep kernel-devel.x86_64 | awk '{print $2}'` ; do dnf download --downloaddir=/root/headers kernel-devel-$eachversion.x86_64 || true ; done;
RUN wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'http://repos-va.psychz.net/centos/8-stream/BaseOS/x86_64/os/Packages/'
RUN wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.tuna.tsinghua.edu.cn/centos/8-stream/BaseOS/x86_64/os/Packages/'
RUN wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.tuna.tsinghua.edu.cn/centos/8-stream/BaseOS/x86_64/os/Packages/' || true

RUN rpm --force -i /root/headers/*.rpm || true

ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh
RUN rm -rf /root/headers/*.rpm
RUN dnf remove -y kernel-devel || true



FROM oraclelinux:8
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
6 changes: 6 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.rhel8_elrepo_lt
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,9 @@ ADD . /elkeid
WORKDIR /elkeid/driver

RUN bash ./build_script/x86_64/batch_compile_elrepo8_lt.sh

RUN yum remove -y kernel-devel || true

FROM cern/c8-base:latest
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
6 changes: 6 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.rhel8_elrepo_ml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,9 @@ ADD . /elkeid
WORKDIR /elkeid/driver

RUN bash ./build_script/x86_64/batch_compile_elrepo8_ml.sh
RUN yum remove -y kernel-devel || true


FROM cern/c8-base:latest
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
5 changes: 5 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.rhel8_plus
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,10 @@ ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile_el8_plus.sh
RUN rm -rf /root/headers/*.rpm
RUN yum remove -y kernel-devel || true



FROM cern/c8-base:latest
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
4 changes: 4 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.rocky8
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,8 @@ WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh
RUN rm -rf /root/headers/*.rpm

RUN yum remove -y kernel-devel || true

FROM rockylinux:8
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
Loading

0 comments on commit 7c66f4c

Please sign in to comment.